}
static Attributes getFileAttributesPosix(FS fs, File path) {
try {
Path nioPath = path.toPath();
PosixFileAttributes readAttributes = nioPath
.getFileSystem()
.provider()
.getFileAttributeView(nioPath,
PosixFileAttributeView.class,
LinkOption.NOFOLLOW_LINKS).readAttributes();
Attributes attributes = new FileUtil.Java7BasicAttributes(
fs,
path,
true, //
readAttributes.isDirectory(), //
readAttributes.permissions().contains(
PosixFilePermission.OWNER_EXECUTE),
readAttributes.isSymbolicLink(),
readAttributes.isRegularFile(), //
readAttributes.creationTime().toMillis(), //
readAttributes.lastModifiedTime().toMillis(),
readAttributes.size());
return attributes;
} catch (NoSuchFileException e) {
return new FileUtil.Java7BasicAttributes(fs, path, false, false,
false, false, false, 0L, 0L, 0L);
} catch (IOException e) {