Enum WatchScope

    • Enum Constant Detail

      • PATH_ONLY

        public static final WatchScope PATH_ONLY

        Watch changes to a single file or (metadata of) a single directory.

        Note, depending on the platform you can receive events for a directory in case of these events:

        • a MODIFIED caused by the creation of a nested file/directory
        • a MODIFIED caused by the deletion of a nested file/directory
        • a MODIFIED of its own metadata

        In most cases when Path is a Directory you're interested in which nested entries changes, in that case use PATH_AND_CHILDREN or PATH_AND_ALL_DESCENDANTS.

      • PATH_AND_CHILDREN

        public static final WatchScope PATH_AND_CHILDREN
        Watch changes to (metadata of) a directory and its content, non-recursively. That is, changes to the content of nested directories are not watched.
      • PATH_AND_ALL_DESCENDANTS

        public static final WatchScope PATH_AND_ALL_DESCENDANTS
        Watch changes to (metadata of) a directory and its content, recursively. That is, changes to the content of nested directories are also watched.
    • Method Detail

      • values

        public static WatchScope[] values()
        Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
        for (WatchScope c : WatchScope.values())
            System.out.println(c);
        
        Returns:
        an array containing the constants of this enum type, in the order they are declared
      • valueOf

        public static WatchScope valueOf​(String name)
        Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)
        Parameters:
        name - the name of the enum constant to be returned.
        Returns:
        the enum constant with the specified name
        Throws:
        IllegalArgumentException - if this enum type has no constant with the specified name
        NullPointerException - if the argument is null