src/windows/classes/sun/nio/fs/WindowsFileSystemProvider.java

Print this page

        

*** 148,180 **** if (sd != null) sd.release(); } } - private boolean followLinks(LinkOption... options) { - boolean followLinks = true; - for (LinkOption option: options) { - if (option == LinkOption.NOFOLLOW_LINKS) { - followLinks = false; - continue; - } - if (option == null) - throw new NullPointerException(); - throw new AssertionError("Should not get here"); - } - return followLinks; - } - @Override @SuppressWarnings("unchecked") public <V extends FileAttributeView> V getFileAttributeView(Path obj, Class<V> view, LinkOption... options) { WindowsPath file = WindowsPath.toWindowsPath(obj); if (view == null) throw new NullPointerException(); ! boolean followLinks = followLinks(options); if (view == BasicFileAttributeView.class) return (V) WindowsFileAttributeViews.createBasicView(file, followLinks); if (view == DosFileAttributeView.class) return (V) WindowsFileAttributeViews.createDosView(file, followLinks); if (view == AclFileAttributeView.class) --- 148,166 ---- if (sd != null) sd.release(); } } @Override @SuppressWarnings("unchecked") public <V extends FileAttributeView> V getFileAttributeView(Path obj, Class<V> view, LinkOption... options) { WindowsPath file = WindowsPath.toWindowsPath(obj); if (view == null) throw new NullPointerException(); ! boolean followLinks = Util.followLinks(options); if (view == BasicFileAttributeView.class) return (V) WindowsFileAttributeViews.createBasicView(file, followLinks); if (view == DosFileAttributeView.class) return (V) WindowsFileAttributeViews.createDosView(file, followLinks); if (view == AclFileAttributeView.class)
*** 207,217 **** } @Override public DynamicFileAttributeView getFileAttributeView(Path obj, String name, LinkOption... options) { WindowsPath file = WindowsPath.toWindowsPath(obj); ! boolean followLinks = followLinks(options); if (name.equals("basic")) return WindowsFileAttributeViews.createBasicView(file, followLinks); if (name.equals("dos")) return WindowsFileAttributeViews.createDosView(file, followLinks); if (name.equals("acl")) --- 193,203 ---- } @Override public DynamicFileAttributeView getFileAttributeView(Path obj, String name, LinkOption... options) { WindowsPath file = WindowsPath.toWindowsPath(obj); ! boolean followLinks = Util.followLinks(options); if (name.equals("basic")) return WindowsFileAttributeViews.createBasicView(file, followLinks); if (name.equals("dos")) return WindowsFileAttributeViews.createDosView(file, followLinks); if (name.equals("acl"))