use of org.structr.files.ssh.filesystem.StructrToplevelAttributes in project structr by structr.
the class StructrSchemaNodePath method getAttributes.
@Override
public <T extends BasicFileAttributes> T getAttributes(Class<T> type, LinkOption... options) throws IOException {
final AbstractSchemaNode schemaNode = getSchemaNode();
if (schemaNode != null) {
final App app = StructrApp.getInstance(fs.getSecurityContext());
String name = null;
try (final Tx tx = app.tx()) {
name = schemaNode.getName();
tx.success();
} catch (FrameworkException fex) {
logger.warn("", fex);
}
return (T) new StructrToplevelAttributes(name);
}
throw new NoSuchFileException(toString());
}
Aggregations