Class DisallowedDirectories

    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      static void clearUnwritableUnsafe()
      Testing only! Clear the set of unwritable directories.
      static int getDirectoriesVersion()  
      java.util.Set<java.io.File> getUnreadableDirectories()  
      java.util.Set<java.io.File> getUnwritableDirectories()  
      static boolean isUnreadable​(java.io.File directory)
      Tells whether or not the directory is disallowed for reads.
      static boolean isUnwritable​(java.io.File directory)
      Tells whether or not the directory is disallowed for writes.
      void markUnreadable​(java.lang.String path)  
      void markUnwritable​(java.lang.String path)  
      static java.io.File maybeMarkUnreadable​(java.io.File path)
      Adds parent directory of the file (or the file itself, if it is a directory) to the set of unreadable directories.
      static java.io.File maybeMarkUnwritable​(java.io.File path)
      Adds parent directory of the file (or the file itself, if it is a directory) to the set of unwritable directories.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • maybeMarkUnreadable

        public static java.io.File maybeMarkUnreadable​(java.io.File path)
        Adds parent directory of the file (or the file itself, if it is a directory) to the set of unreadable directories.
        Returns:
        the disallowed directory or null if nothing has been added to the list.
      • maybeMarkUnwritable

        public static java.io.File maybeMarkUnwritable​(java.io.File path)
        Adds parent directory of the file (or the file itself, if it is a directory) to the set of unwritable directories.
        Returns:
        the disallowed directory or null if nothing has been added to the list.
      • getDirectoriesVersion

        public static int getDirectoriesVersion()
      • clearUnwritableUnsafe

        public static void clearUnwritableUnsafe()
        Testing only! Clear the set of unwritable directories.
      • isUnreadable

        public static boolean isUnreadable​(java.io.File directory)
        Tells whether or not the directory is disallowed for reads.
        Returns:
        whether or not the directory is disallowed for reads.
      • isUnwritable

        public static boolean isUnwritable​(java.io.File directory)
        Tells whether or not the directory is disallowed for writes.
        Returns:
        whether or not the directory is disallowed for reads.