getFolder(path) Last updated: 17. Oct 2026

Returns information about a folder by given path.

See also: getFolderProps getFiles folderExists Path traversal

Parameters

Name Type Description
path string

Path to the folder, from the site root.

Returns

An object with the folder's own properties (from its folder properties document) plus Name, DoclyId, Guid, LastModified, Created, Size and Path — and FormName when the properties document has a schema. null when the path is empty or the folder does not exist.

No access check is made. Properties in an encrypted folder can only be read after unlockFolder.

Example

Code example (JS)

JS is normal JavaScript either running in the browser or on the Docly™ server.
/* Get the folder with getFolder */
let folder = docly.getFolder("/Test files");

/* Format the output */
var json = JSON.stringify(folder);

var formatted = docly.formatJson(json).replace("\r", "");
write(formatted);

Output

The JS code above produces the output shown below:
{
  "DisplayName": "",
  "Description": "",
  "Hide": true,
  "Image": "",
  "SortOrder": 9,
  "DefaultContent": true,
  "Accept": "",
  "SpecifyCustomColumns": false,
  "CustomColumns": [],
  "CustomColumns_type": "CustomColumns",
  "OKCount": "0",
  "PassedCount": "0",
  "FailedCount": "0",
  "TotalCount": "0",
  "RemainCount": "0",
  "Name": "Test files",
  "DoclyId": 45971,
  "Guid": "C8d12d7JNk-kdRcdq0udaw",
  "LastModified": "2026-08-21T08:28:00.1932319+02:00",
  "Created": "2022-12-19T16:06:00.8759219+01:00",
  "Size": 8164,
  "Path": "/Test files",
  "FormName": "Published folder"
}