Class DisallowedDirectories

    • Method Detail

      • maybeMarkUnreadable

        public static File maybeMarkUnreadable​(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 File maybeMarkUnwritable​(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​(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​(File directory)
        Tells whether or not the directory is disallowed for writes.
        Returns:
        whether or not the directory is disallowed for reads.