Guest_imported
New member
- Jan 1, 1970
- 0
Hello everyone,
I have a little script below:
Arrays.sort( strFiles ) ;
// display list of matching file names
out.println( "<ol>" ) ;
for ( int k = 0 ; k < strFiles.length ; k++ )
out.println( "<li>" + strFiles[k] + "</li>" ) ;
out.println( "</ol>" ) ;
In my C:\test directroy I have 2 files, test.htm (2K) and test2.htm (3K). The script above will displays these two files in my C:\test directory as output:
1. test1.htm
2. test2.htm
I'd like to have function like isDirectory(), lastModified(), and fileSize(), so that it will displays more information about this file. So the output might be something.
1. test1.htm 2K on April 3, 2002 at 8:04 PM.
2. test2.htm 3K on April 4, 2002 at 4:14 PM.
If you could help me how to call or write the function to make this work, I'll appreciate it very much.
Regards,
Vivian
I have a little script below:
Arrays.sort( strFiles ) ;
// display list of matching file names
out.println( "<ol>" ) ;
for ( int k = 0 ; k < strFiles.length ; k++ )
out.println( "<li>" + strFiles[k] + "</li>" ) ;
out.println( "</ol>" ) ;
In my C:\test directroy I have 2 files, test.htm (2K) and test2.htm (3K). The script above will displays these two files in my C:\test directory as output:
1. test1.htm
2. test2.htm
I'd like to have function like isDirectory(), lastModified(), and fileSize(), so that it will displays more information about this file. So the output might be something.
1. test1.htm 2K on April 3, 2002 at 8:04 PM.
2. test2.htm 3K on April 4, 2002 at 4:14 PM.
If you could help me how to call or write the function to make this work, I'll appreciate it very much.
Regards,
Vivian