NIO2 is part of JDK7 and JDK7 is around the corner. There are many things that can be done to align filesystem API and NIO2. This issue is supposed to track them.
The first goal is to write a bridge to expose any FileObject based solution via NIO2 path API.
I would say the first priority would be to use the native parts of NIO.2 to improve the functionality and reliability of existing NB code paths:
- create a Notifier impl delegating to WatchService
- use Files.probeContentType from a low-priority MIMEResolver
- define File FileUtil.fromURL(URL) and URL FileUtil.toURL(File), using Path.toUri and Paths.get(URI) on JDK 7 and using File.toURI and new File(URI) plus special UNC handling on JDK 6, and use them throughout the NB code base wherever URL's (or URI's) are being interconverted with File's
- define FileUtil methods delegating to Path.resolve/relativize on JDK 7 (and some near-equivalent on JDK 6) and use them in various places, e.g. project.ant
- use Files.copy(..., COPY_ATTRIBUTES) for FileObject.copy in masterfs
- use Path.normalize/realPath in FileUtil.normalizeFile
Created attachment 109169 [details]
Test to verify netigso