-
Notifications
You must be signed in to change notification settings - Fork 286
Open
Labels
Description
The following:
BasicFileAttributeView attributes = Files.getFileAttributeView(symlink, BasicFileAttributeView.class, LinkOption.NOFOLLOW_LINKS);
if (attributes != null) {
attributes.setTimes(fileTime, null, null);
}only works in openjdk since JDK11 https://bugs.openjdk.java.net/browse/JDK-8220793, so it may be worth adding a special behavior to fail when running on earlier versions.
PosixFileAttributeView attributes = Files.getFileAttributeView(symlink, PosixFileAttributeView.class, LinkOption.NOFOLLOW_LINKS);
if (attributes != null) {
attributes.setPermissions(modes);
}should fail when the link is dangling (as it should only operates on the target of the link on Unix - it's possible on macOS, but there is no such support in java.nio)
Reactions are currently unavailable