src/share/classes/sun/nio/fs/Util.java

Print this page

        

*** 24,33 **** --- 24,34 ---- */ package sun.nio.fs; import java.util.*; + import java.nio.file.*; /** * Utility methods */
*** 78,83 **** --- 79,101 ---- for (E e: elements) { set.add(e); } return set; } + + /** + * Returns {@code true} if symbolic links should be followed + */ + static boolean followLinks(LinkOption... options) { + boolean followLinks = true; + for (LinkOption option: options) { + if (option == LinkOption.NOFOLLOW_LINKS) { + followLinks = false; + } if (option == null) { + throw new NullPointerException(); + } else { + throw new AssertionError("Should not get here"); + } + } + return followLinks; + } }