Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-4096648

java.io.File.isDirectory and lastModified fail on "x:" (win32)

XMLWordPrintable

    • 1.2fcs
    • x86
    • windows_nt
    • Not verified



      Name: vuC71690 Date: 12/03/97


      For pathnames of the form `x:' method File.isDirectory() always
      returns false, and method File.lastModified() always returns 0.

      Here is the test that demonstrates the bug:

      ----8<---- StatTest.java ----8<----
      import java.io.File;
      class StatTest {
        public static void main (String[] args) {
          File ccwd = new File ("c:");
          System.out.println("dirp = " + ccwd.isDirectory());
          System.out.println("mtime = " + ccwd.lastModified());
        }
      }
      ----8<---- Output from StatTest ----8<----
      dirp = false
      mtime = 0

      ======================================================================

            mr Mark Reinhold
            duke J. Duke
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: