saveFolderProps(path, values, [options]) Last updated: 17. Oct 2026

API only function

Saves the properties of a folder — the data in its folder properties document. The call runs as the user who published the site, not as the visitor. Check the visitor's own rights with allowModify before you change anything on their behalf.

See also: Path traversal

Parameters

Name Type Description
path string

Path to the folder, from the site root.

values object

The complete set of properties, as an object or a JSON string. It replaces what is stored — nothing is merged, so read the current properties with getFolderProps first if you only want to change some of them.

options (optional)objectSpecify any of the following options parameters:
• schema string

Schema (name or guid) for the folder properties document. Only used when the folder has no properties document yet: one is then created with this schema. Without it, saving to a folder with no properties document throws.

Returns

An object with Id, Timestamp, Filename, Changed, Renamed and CompileStatus.

Throws (error 1) if the path or values are missing, values is not valid JSON, the folder does not exist, or the folder has no properties document and no schema is given. A target that only exists in the app (publish template) the site runs from throws error 110: the app's files are shared by every site on it and can't be changed from a site.

Example

Code example (JS)

JS is normal JavaScript either running in the browser or on the Docly™ server.
export default (folderPath, properties) => {
    // Save folder properties with a specific schema
    var result = docly.saveFolderProps(folderPath, properties, { "schema" : "My folder type" });
    return result;
}