File Manager Make Directory
Create a folder using the specified name.
If the parent or intermediate level folders do not exist, and the parameter createParentDirectories is false, a FileNotFound fault is thrown. If the intermediate level folders do not exist, and the parameter createParentDirectories is true, all the non-existent folders are created.
Requires Datastore.FileManagement privilege on the datastore.
The unique identifier for the managed object to which the method attaches; the serialized managed object reference for a request has the form moType/moId
, in this case FileManager/{moId}
.
The vSphere release schema. The current specification covers vSphere 8.0.2.0 APIs.
{
"name": "string",
"datacenter": {
"_typeName": "string",
"type": "string",
"value": "string"
},
"createParentDirectories": false
}
The name of the folder, either a URL or a datastore path referring to the folder to be created.
If true, any non-existent intermediate level folders will be created. If not specified, it is assumed to be false.
No Content
InvalidDatastore: if the operation cannot be performed on the datastore. Typically, a specific subclass of this exception is thrown.
CannotCreateFile: if the create operation on the folder fails.
FileAlreadyExists: if a file or folder with the given name already exists at the destination.
FileNotFound: if the createParentDirectories is false and a intermediate level folder specified by name is not found.
FileFault: if there is a generic file error
{
"_typeName": "string",
"faultCause": "MethodFault Object",
"faultMessage": [
{
"_typeName": "string",
"key": "string",
"arg": [
{
"_typeName": "string",
"key": "string",
"value": {
"_typeName": "string"
}
}
],
"message": "string"
}
]
}