Loading...
Processing Forum
Recent Topics
All Forums
Screen name:
andrew.e.thornton
andrew.e.thornton's Profile
1
Posts
0
Responses
0
Followers
Activity Trend
Last 30 days
Last 30 days
Date Interval
From Date :
To Date :
Go
Loading Chart...
Posts
Responses
PM
Show:
All
Discussions
Questions
Expanded view
List view
Private Message
file.listFiles() listing and sorting files
[1 Reply]
14-Nov-2011 11:17 AM
Forum:
Programming Questions
I am trying to list the contents in a directory in the order of creation.
like you get by using ls -t1r
I found this in the learning section.
DirectoryList \ Learning \ Processing.org
Exerpt:
// This function returns all the files in a directory as an array of File objects
// This is useful if you want more info about the file
File[] listFiles(String dir) {
File file = new File(dir);
if (file.isDirectory()) {
File[] files = file.listFiles();
return files;
} else {
// If it's not a directory
return null;
}
}
Any clues how to implement file.listFiles() to list files in creation in order?
Thank you,
AndrewT
«Prev
Next »
Moderate user : andrew.e.thornton
Forum