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

Files.isHidden() Bug

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Not an Issue
    • Icon: P3 P3
    • None
    • 7u45
    • core-libs

      FULL PRODUCT VERSION :
      build 1.7.0_45-b18

      ADDITIONAL OS VERSION INFORMATION :
      Windows 7 Enterprise
      Service Pack 1
      64-Bit

      A DESCRIPTION OF THE PROBLEM :
      The function "Files.isHidden(Path)" isn't working correctly.
      If I sent a Path like 'C:\Temp\test.txt' which is hiden, die function return true.
      When i sent ja directory 'C:\Temp2 which is hidden, die function return false.

      so i think, there is a error with direcctoriers.

      ADDITIONAL REGRESSION INFORMATION:
      build 1.7.0_45-b18

      STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
      I want to check if a Directory is hidden.


      REPRODUCIBILITY :
      This bug can be reproduced always.

      ---------- BEGIN SOURCE ----------
      Path dir = Paths.get("C:\\APPL\\Test");
      try {
      DirectoryStream<Path> stream = Files.newDirectoryStream(dir);
      for (Path path : stream) {
      System.out.println(path);
      System.out.println(Files.isHidden(path));
      }
      } catch (IOException e) {
      e.printStackTrace();
      }
      ---------- END SOURCE ----------

      CUSTOMER SUBMITTED WORKAROUND :
      path.toFile().isHidden()

      SUPPORT :
      YES

            Unassigned Unassigned
            mduigou Mike Duigou
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: