File System API should deprecate and replace following java.io.File centric methods:
FileUtil.addFileChangeListener(FileChangeListener listener, File path)
FileUtil.addRecursiveListener(FileChangeListener listener, File path)
FileUtil.addRecursiveListener(FileChangeListener listener, File path, Callable<Boolean> stop)
FileUtil.normalizeFile(final File file)
FileUtil.removeFileChangeListener(FileChangeListener listener, File path)
FileUtil.removeRecursiveListener(FileChangeListener listener, File path)
There is FileObject.addRecursiveListener, FileObject.addFileChangeListener. FileObject.refresh(), FileSystem.refresh().
I don't know how to replace normalizeFile(File).
(In reply to comment #1)
[VK01] Do you mean FileObject.addRecursiveListener, FileObject.addFileChangeListener.
FileObject.refresh(), FileSystem.refresh() are quite the same as correspondent FileUtil methods?
(If that's true, then it isn't clear to me, why did they appear in FileUtil; but this probably doesn't matter)
[VK02] Even if the functionality are same, I would propose adding them to FileUtil, just to not force developers using files in situations file objects can be used.
[VK03] It seems we need an SPI to be able to do normalization.
An example of such SPI can be found in org.netbeans.modules.dlight.remote
the implementation is in org.netbeans.modules.dlight.remote.impl
FileObject.xyz methods are in general the same, but they require the FileObject to already exist. The additional functionality of FileUtil.xyz(File) is that it can apply even to non-existing files.
Why the java.io.File methods are there? Around NetBeans 4.0, a feeling that File System API is only/primarily useful for java.io.File access straighten up. Since then more and more functionality primarily working with java.io.File has been incorporated into the APIs. Usually (but not always) with some fallback/options for non-java.io.File implementations. Your effort to make remote fs a first class citizen will likely reverse this unfortunate direction.
Re. VK01, VK02. I can stick with current state, but if you want submit patches.
VK03: Again, you can submit patch. Btw. fileObject.getAttribute("normalizedFO") would be the simplest SPI...
Need a patch.
No patch. No fun.