Name: paC48320 Date: 04/24/98
Here is the java program.
------------
import java.io.*;
public class TestFile {
public static void main(String[] args) throws IOException {
File file = new File(args[0]);
System.out.println(file.isDirectory());
System.out.println(file.list());
}
}
------------
When compiling and running (JDK1.1.5) on WinNT4.0,
the outcome is:
-----------------
% java TestFile C:
false
[Ljava.lang.String;@2069aa
-----------------
In the test program, assuming as a drive letter that <drive> exists,
when running "java TestFile <drive>:", list() returns NON null, however
isDirectory() returns false.
For "<drive:>", I think that isDirectory() should return true.
Please clarify it.
(Review ID: 28947)
======================================================================
- duplicates
-
JDK-4096648 java.io.File.isDirectory and lastModified fail on "x:" (win32)
- Closed