@Override public DynamicFileAttributeView getFileAttributeView( Path obj, String name, LinkOption... options) { if (name.equals("dos")) { return new LinuxDosFileAttributeView(UnixPath.toUnixPath(obj), Util.followLinks(options)); } if (name.equals("user")) { return new LinuxUserDefinedFileAttributeView( UnixPath.toUnixPath(obj), Util.followLinks(options)); } return super.getFileAttributeView(obj, name, options); }
@Override @SuppressWarnings("unchecked") public <V extends FileAttributeView> V getFileAttributeView( Path obj, Class<V> type, LinkOption... options) { if (type == DosFileAttributeView.class) { return (V) new LinuxDosFileAttributeView(UnixPath.toUnixPath(obj), Util.followLinks(options)); } if (type == UserDefinedFileAttributeView.class) { return (V) new LinuxUserDefinedFileAttributeView( UnixPath.toUnixPath(obj), Util.followLinks(options)); } return super.getFileAttributeView(obj, type, options); }