Create an empty file or directory
Creates an empty file or directory. In the request body, set the isDirectory
attribute to 'false' for files and to 'true' for a directory. The name
attribute specifies the name of the new file or directory. Provide the path of the new file or directory either in the URI or in the path
attribute in the request body. If you do not provide a path, then the new file or directory is created under the current working directory.
1{2 "isDirectory": false,3 "modifiedTimeStamp": "2018-11-07T08:32:45Z",4 "name": "hello.txt",5 "path": "test",6 "readOnly": false,7 "size": 6,8 "version": 1,9 "links": [10 {11 "href": "/compute/sessions/RKEY-ses0000/files/test~fs~hello.txt",12 "method": "GET",13 "rel": "self",14 "type": "application/vnd.sas.compute.file.properties",15 "uri": "/compute/sessions/RKEY-ses0000/files/test~fs~hello.txt"16 },17 {18 "href": "/compute/sessions/RKEY-ses0000/files/test~fs~hello.txt/content",19 "method": "GET",20 "rel": "getFile",21 "type": "text/plain",22 "uri": "/compute/sessions/RKEY-ses0000/files/test~fs~hello.txt/content"23 },24 {25 "href": "/compute/sessions/RKEY-ses0000/files/test~fs~hello.txt",26 "method": "DELETE",27 "rel": "deleteFile",28 "uri": "/compute/sessions/RKEY-ses0000/files/test~fs~hello.txt"29 },30 {31 "href": "/compute/sessions/RKEY-ses0000/files/test~fs~hello.txt/content",32 "method": "PUT",33 "rel": "createFile",34 "type": "text/plain",35 "uri": "/compute/sessions/RKEY-ses0000/files/test~fs~hello.txt/content"36 },37 {38 "href": "/compute/sessions/RKEY-ses0000/files/test~fs~hello.txt",39 "method": "PUT",40 "rel": "renameFile",41 "responseType": "application/vnd.sas.compute.file.properties",42 "type": "application/vnd.sas.compute.file.properties",43 "uri": "/compute/sessions/RKEY-ses0000/files/test~fs~hello.txt"44 },45 {46 "href": "/compute/sessions/RKEY-ses0000/files/{destinationFile}",47 "method": "POST",48 "rel": "copyFile",49 "responseType": "application/vnd.sas.compute.file.properties",50 "type": "application/vnd.sas.compute.file.request",51 "uri": "/compute/sessions/RKEY-ses0000/files/{destinationFile}"52 }53 ]54}
Name | Type | Required | Description |
---|---|---|---|
fileOrDirectoryPath | string | true | Specifies the file or directory path. In the path value, replace each forward slash with |
sessionId | string<object-id> | true | Specifies the ID of the session. |
Name | Type | Required | Description |
---|---|---|---|
expandPath | boolean | false | Specifies whether to return fully qualified paths in response links. Default: false |
Specifies the file or directory name
and path
elements. The name
element is required and the path
element is optional.
Provides properties of a file or directory object.
Name | Type | Required | Description |
---|---|---|---|
links | array [Link] | false | Specifies links that apply to this file or directory object. |
size | integer<int64> | false | Specifies the size of the file or directory. |
Status | Meaning | Description | ||
---|---|---|---|---|
201 | Created | An empty file or directory was created. | Headers | Schema |
400 | Bad Request | The request was invalid. The file or directory can not be created. | Schema | |
415 | Unsupported Media Type | The requested media type is not supported. | Schema |