5

Recent Windows 10 builds feature an ability to mark a single NTFS directory (not the whole file system) as case sensitive, via fsutil.exe:

If I want to query the case-sensitive flag of a given directory from a Java application, I'm currently left with the only option of calling

fsutil.exe file queryCaseSensitiveInfo ...

on a per-directory basis, which means spawning potentially multiple processes, which is expensive.

Are there any planned NIO.2 API extensions in newer Java versions (11+) targeted at case-sensitive NTFS and/or WSL file systems?

Bass
  • 4,977
  • 2
  • 36
  • 82
  • No, there is not, because that would be an OS-specific API, and Java is mostly OS-agnostic. – Andreas Dec 01 '20 at 20:19
  • 1
    @Andreas, still, while being OS-agnostic, Java (starting with version 7) supports OS-specific `Path` implementations for UNIX and Windows and can read both POSIX and NTFS file attributes. Not to mention Windows-specific AsyncIO support. – Bass Dec 01 '20 at 21:36
  • Java on Windows handles filesystem access of files a/A in same case-sensitive dir - eg Files.readString() or Files.exists checks different case files, BUT Path manipulation does not check the underlying filesystem case - so a.equals(A) is true even when Files.exists(A) is true and Files.exists(a) is false, same for a.toFile().exists() and a.toFile().equals(A.toFile()). – DuncG Dec 02 '20 at 10:35

0 Answers0