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
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
- relates to
-
JDK-8215467 Files.isHidden should return true for hidden directories on Windows
- Resolved