共用方式為


3.3.5.58.10 Receiving a TRANS2_CREATE_DIRECTORY Request

Upon receipt of a TRANS2_CREATE_DIRECTORY (section 2.2.6.14) subcommand request, the Trans2 subsystem MUST validate the path provided in the DirectoryName field of the Trans2_Parameters block. All elements of the path indicated by DirectoryName, except for the final element of the path, MUST exist within the share indicated by the TID in the SMB Header (section 2.2.3.1). The final element of the path MUST NOT exist, otherwise, the request MUST fail and the server MUST return an error response with Status set to STATUS_OBJECT_NAME_COLLISION (ERRDOS/ERRfilexists). If the underlying object store returns STATUS_ACCESS_DENIED, Server.Statistics.sts0_permerrors MUST be increased by 1.

If the DirectoryName is valid, the server MUST attempt to create the directory. Any error in creating the directory MUST be returned in an error response.

If the directory is successfully created, and if the client provided a list of Extended Attributes (EAs) in the Trans2_Data block of the request, the server MUST attempt to set the EAs on the newly created directory. If an error is generated when setting the EAs, the offset of the EA that caused the error relative to the start of the ExtendedAttributeList.FEAList MUST be returned in the EaErrorOffset of the response. In this case, a full response (not an error response) MUST be sent to the client.<346>

If the command is successful, Server.Statistics.sts0_fopens MUST be increased by 1.