Enum FileUtils.OpenFileResult

  • All Implemented Interfaces:
    java.io.Serializable, java.lang.Comparable<FileUtils.OpenFileResult>
    Enclosing class:
    FileUtils

    public static enum FileUtils.OpenFileResult
    extends java.lang.Enum<FileUtils.OpenFileResult>
    Indicates whether a file was successfully opened. If not, provides specific reasons along with a general failure case
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
      CANT_CREATE
      The file could not be opened because it did not exist and could not be created
      CANT_WRITE
      The file can be opened but in read-only
      FAILURE
      The file could not be opened, for non-specified reasons
      NOT_FILE
      The specified path pointed to a non-file filesystem object, ie a directory
      SUCCESS
      The file was successfully opened
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static FileUtils.OpenFileResult valueOf​(java.lang.String name)
      Returns the enum constant of this type with the specified name.
      static FileUtils.OpenFileResult[] values()
      Returns an array containing the constants of this enum type, in the order they are declared.
      • Methods inherited from class java.lang.Enum

        clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
      • Methods inherited from class java.lang.Object

        getClass, notify, notifyAll, wait, wait, wait
    • Enum Constant Detail

      • CANT_CREATE

        public static final FileUtils.OpenFileResult CANT_CREATE
        The file could not be opened because it did not exist and could not be created
      • NOT_FILE

        public static final FileUtils.OpenFileResult NOT_FILE
        The specified path pointed to a non-file filesystem object, ie a directory
    • Method Detail

      • values

        public static FileUtils.OpenFileResult[] 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 (FileUtils.OpenFileResult c : FileUtils.OpenFileResult.values())
            System.out.println(c);
        
        Returns:
        an array containing the constants of this enum type, in the order they are declared
      • valueOf

        public static FileUtils.OpenFileResult valueOf​(java.lang.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:
        java.lang.IllegalArgumentException - if this enum type has no constant with the specified name
        java.lang.NullPointerException - if the argument is null