use of java.nio.file.attribute.PosixFileAttributes in project ignite by apache.
the class IgfsLocalSecondaryFileSystemTestAdapter method properties.
/** {@inheritDoc} */
@Override
public Map<String, String> properties(final String path) throws IOException {
Path p = path(path);
PosixFileAttributes attrs = Files.getFileAttributeView(p, PosixFileAttributeView.class).readAttributes();
Map<String, String> props = new HashMap<>();
props.put(IgfsUtils.PROP_USER_NAME, attrs.owner().getName());
props.put(IgfsUtils.PROP_GROUP_NAME, attrs.group().getName());
props.put(IgfsUtils.PROP_PERMISSION, permissions(path));
return props;
}
Aggregations