Creates a folder (also parent folders if missing) from specified path.
DeleteFile(filePath)
Deletes a specified file.
DeleteFolder(folderPath)
Deletes a specified folder.
FileExists(filePath)
Check whether a file exists or not within the site.
FolderExists(path)
Check whether a folder exists or not within your site.
GetEmbeddedFile(path, id)
Get bytes of an embedded file (image or file upload) in a specific document.
GetEmbeddedTextFile(path, id, encoding)
Get the size of an embedded file (image or file upload) in a specific document.
Include(path, template)
Include a file or template into another page.
GetEmbeddedFileSize(path, id)
Get the size of an embedded file (image or file upload) in a specific document.
GetFiles(path, searchPattern, depth, mode)
Gets a list of files from folder / optionally recursively from subfolders.
GetFolder(path)
Returns information about a folder by given path.
GetFolders(path, searchPattern, depth)
Gets a list of all subfolders below a specific folder.
GetFile(filepath, metadata)
Gets information about a specific file.
GetJson(filepath)
Loads a JSON file and returns the content as an object.
LinkFile(embeddedId, filename)
Creates the link to an embedded file within the current document. This function is only available for display templates for document schemas.
ListFiles(path, searchPattern)
The fastes function to retreive a list of files from a specific path.
LinkImage(path, width, height, mode)
Creates a link to an image within a document. Only works from site display templates for documents.
Image scaling
Read about the different scaling modes here.
LoadExcel(filename, column, row, sheet)
Loads data from Excel file into an array of objects.
MoveFile(filePath, toPath)
Moves a file from one folder to another, and renames it if the name part of the path is changed.
MoveFolder(folderPath, destinationPath)
Moves a folder within your site.
RenameFile(filePath, newName)
Renames a file.
SaveEmbeddedFile(filePath, filename, data)
Saves an embedded file to an existing Docly document. Note that embedded files that are not referenced by a field in the document will be automatically deleted.
SaveFile(filePath, data, schema, ensurePath)
Saves a file to Docly document according to specified schema. Overwrites if it already exists.
SaveJson(filePath, data)
Saves a JSON file to Docly with specified data stringified to JSON. See also "SaveFile" - it is a more advanced function to save Docly documents with any specified schema.