Recent Java 9 commit (e5b66323ae45) breaks fsync on directory

Francis Galiegue fgaliegue at gmail.com
Sat May 16 17:33:10 UTC 2015


On Sat, May 16, 2015 at 7:30 PM, Francis Galiegue <fgaliegue at gmail.com> wrote:
[...]
>
> As to a new API, well, why not StandardOpenOption.DIRECTORY?
> O_DIRECTORY has existed for open(2) since POSIX.1-2008 (says open(2)),
> and it is even specified that if the path is not a directory the
> failure is ENOTDIR. Excellent, we have NotDirectoryException already.
>

In fact, even better: OpenOption is an interface after all, so this is
only a matter of providing a default FileSystemProvider which
acknowledges a custom OpenOption of yours; as a bonus this will work
even with Java 8, before and after the change.

Regards,
-- 
Francis Galiegue, fgaliegue at gmail.com, https://github.com/fge
JSON Schema in Java: http://json-schema-validator.herokuapp.com
Parsers in pure Java: https://github.com/fge/grappa


More information about the nio-dev mailing list