Enum Class SMB2CreateDisposition

java.lang.Object
java.lang.Enum<SMB2CreateDisposition>
com.hierynomus.mssmb2.SMB2CreateDisposition
All Implemented Interfaces:
EnumWithValue<SMB2CreateDisposition>, Serializable, Comparable<SMB2CreateDisposition>, Constable

public enum SMB2CreateDisposition extends Enum<SMB2CreateDisposition> implements EnumWithValue<SMB2CreateDisposition>
[MS-SMB2].pdf 2.2.13 SMB2 CREATE Request - CreateDisposition

Defines the action the server MUST take if the file that is specified in the name field already exists. For opening named pipes, this field may be set to any value by the client and MUST be ignored by the server. For other files, this field MUST contain one of the following values.

  • Enum Constant Details

    • FILE_SUPERSEDE

      public static final SMB2CreateDisposition FILE_SUPERSEDE
      If the file already exists, supersede it. Otherwise, create the file. This value SHOULD NOT be used for a printer object.
    • FILE_OPEN

      public static final SMB2CreateDisposition FILE_OPEN
      If the file already exists, return success; otherwise, fail the operation. MUST NOT be used for a printer object.
    • FILE_CREATE

      public static final SMB2CreateDisposition FILE_CREATE
      If the file already exists, fail the operation; otherwise, create the file.
    • FILE_OPEN_IF

      public static final SMB2CreateDisposition FILE_OPEN_IF
      Open the file if it already exists; otherwise, create the file. This value SHOULD NOT be used for a printer object.
    • FILE_OVERWRITE

      public static final SMB2CreateDisposition FILE_OVERWRITE
      Overwrite the file if it already exists; otherwise, fail the operation. MUST NOT be used for a printer object.
    • FILE_OVERWRITE_IF

      public static final SMB2CreateDisposition FILE_OVERWRITE_IF
      Overwrite the file if it already exists; otherwise, create the file. This value SHOULD NOT be used for a printer object.
  • Field Details

    • value

      private long value
  • Constructor Details

    • SMB2CreateDisposition

      private SMB2CreateDisposition(long value)
  • Method Details

    • values

      public static SMB2CreateDisposition[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static SMB2CreateDisposition valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (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 class has no constant with the specified name
      NullPointerException - if the argument is null
    • getValue

      public long getValue()
      Specified by:
      getValue in interface EnumWithValue<SMB2CreateDisposition>