3.1.4.12 FileOperation Subrequest

This operation is used to make a request to the protocol server for a file operation.<62> Depending on the FileOperation attribute value, the protocol server interprets the request as the following type of file operation:

  • Rename

The FileOperation attribute is defined in section 2.3.3.8. The SubRequestData element for a file operation subrequest is of type FileOperationSubRequestDataType and is defined in section 2.3.1.33.

The protocol client sends a FileOperation SubRequest message, which is of type FileOperationSubRequestType as specified in section 2.3.1.34. The protocol server responds with a FileOperation SubResponse message, which is of type FileOperationSubResponseType as specified in section 2.3.1.35. This is done as follows:

  • The protocol client prepares a request containing a URL for the file, a unique Request token, and one or more SubRequest elements, as defined in section 2.2.3.2 and section 2.2.3.8. The SubRequest element is of type "FileOperation" and the SubRequestData element contains attributes that are input parameters used by the protocol server when processing the file operation subrequest. The SubRequestData element is of type FileOperationSubRequestDataType and is defined in section 2.3.1.33.

  • The protocol server receives the request, parses the logic, and depending on the type of file operation subrequest, processes the file operation request.

The Response element is defined in section 2.2.3.5 and the SubResponse element is defined in section 2.2.3.10.

The protocol server returns results based on the following conditions:

  • If the processing of the FileOperation subrequest by the protocol server failed to perform the operation or encountered an unknown exception, the protocol server returns an error code value set to "SubRequestFail".

  • Otherwise, the protocol server sets the error code value to "Success" to indicate success in processing the FileOperation subrequest.

If the FileOperation attribute is set to "Rename", the protocol server considers the file operation subrequest to be of type "Rename". The protocol server processes this request to request a name change of a file on the server. The requested new name for the file is specified by the NewFileName attribute.

If any failure occurs such that the subrequest cannot be processed successfully, the protocol server returns an implementation-specific error.