3.2.4.3 Application Requests Creating a Directory

The application provides:

  • A Client.TreeConnect indicating the share within which the new directory is to be created.

  • The pathname of the directory to be created, relative to Client.TreeConnect.ShareName.

  • A valid Client.Session.

  • An optional list of extended attributes for TRANS2_CREATE_DIRECTORY (section 2.2.6.14).

  • An optional timeout value for the SMB_COM_TRANSACTION2 Request command.

The client SHOULD construct a TRANS2_CREATE_DIRECTORY subcommand request message as specified in section 2.2.6.14. Alternately, the client MAY construct an SMB_COM_CREATE_DIRECTORY request message as specified in section 2.2.4.1 or an SMB_COM_NT_CREATE_ANDX request message as specified in section 2.2.4.64. The SMB_COM_CREATE_DIRECTORY (section 2.2.4.1) command is deprecated in favor of TRANS2_CREATE_DIRECTORY (section 2.2.6.14).

The following additional rules MUST be followed for message construction:

  • The SMB_Header.TID field MUST match the Client.TreeConnect.TID supplied by the application.

  • The SMB_Header.UID field MUST match the Client.Session.UID supplied by the application.

  • The DirectoryName field MUST contain the pathname supplied by the application.

The request MUST be sent to the server as described in section 3.2.4.1.