CreateFolder(folderPath, [folderType], [folderData]) Last updated: 16. May 2023
API only function
Creates a folder (also parent folders if missing) from specified path.
Parameters
Name | Type | Description |
---|---|---|
folderPath | string | Entire absolute folder path to create. |
folderType (optional) | string | Schema type of folder to create. Path to schema or guid. |
folderData (optional) | object | Data for folder of specific schema type. |
Returns
JSON with Guid, Name and Success.
Example
Code example (JS)
JS is normal JavaScript either running in the browser or on the Docly™ server.// This will ensure that the specified folder path
// either already exists or is created
let folder = docly.createFolder("folder 1/part 2/folder");
// Here is the ID for the folder:
write(folder.Guid);