Hello All,
I recently had a problem while working with java. I was trying to list out
the files from a directory with the listFiles((fileExtension) method of
Filchoose.FileFilter. My file names are in Japanese.
PROBLEM:
There is no problem if we are having small file names (Japanese) in the
directory. But if I create a Japanese file name with file name length > 260,
the listFiles() return only the list until this long file read. It doesnt
return that long filename and the other files following.
I dont see any exception too. But I need to get the list of all files. Is
there a work around for this problem?
Here is the code that I wrote :
File file = new File( "E:\a\b\c") ;
FileFilter filefilter_ = new XAPFileFilter( ) ; // wrapped
filefiler
filefilter_.addExtension( newExtension ) ;
File children[ ] = file.listFiles( fileFilter_ ) ;
files = children ;
System.out.println( "Files are " );
int length = files.length ;
for( int i = 0 ; i < length ; i++ ) {
System.out.println("File " + i + " : " +
files[ i ].getName( ));
}
Regards,
Joshy
____________________________________________________
To change your JDJList options, please visit:
http://www.sys-con.com/java/list.cfm
Be respectful! Clean up your posts before replying
____________________________________________________