Reputation: 21
I have this declaration of var. through inner anon. class:
String datFiles[]=folder.list(new FilenameFilter(){
public boolean accept(File folder, String fileName) {
return fileName.endsWith(".xyz");
}
});
I think that there is no problem. But for folders in the same parent folder it returns list regardless there is no .xyz files. At another level of folder it return null if there is no match.
I am thinking that maybe on another computer there might by some permissions problems.
Thank you very very much for hints.
Upvotes: 0
Views: 59
Reputation: 21
I have discovered that this related somehow to relative and absolute path. If somebody is curious I can tell more detail.
Upvotes: 0
Reputation: 33000
The returned array is null
if folder
does not denote a directory.
Else a non-null array will be returned containing all files which match the filter.
Upvotes: 2