Interface of the folder class

interface IFolder {
    attributes: Attribute;
    basename: string;
    crtime: undefined | Date;
    data: NodeData;
    dirname: string;
    displayname: string;
    encodedSource: string;
    extension: null;
    fileid: undefined | number;
    isDavRessource: boolean;
    mime: "httpd/unix-directory";
    mtime: undefined | Date;
    owner: null | string;
    path: string;
    permissions: Permission;
    root: null | string;
    size: undefined | number;
    source: string;
    status: undefined | NodeStatus;
    type: Folder;
    clone(): Node;
    move(destination: string): void;
    rename(basename: string): void;
    update(attributes: Attribute): void;
    updateMtime(): void;
}

Hierarchy (view full)

Properties

attributes: Attribute
basename: string
crtime: undefined | Date
data: NodeData
dirname: string
displayname: string
encodedSource: string
extension

Get this object's extension There is no setter as the source is not meant to be changed manually. You can use the rename or move method to change the source.

fileid: undefined | number
isDavRessource: boolean
mime

Get the file mime There is no setter as the mime is not meant to be changed

mtime: undefined | Date
owner: null | string
path: string
permissions: Permission
root: null | string
size: undefined | number
source: string
status: undefined | NodeStatus
type: Folder

Is it a file or a folder ?

Methods

  • Rename the node This aliases the move method for easier usage

    Parameters

    • basename: string

      The new name of the node

    Returns void

  • Update the attributes of the node Warning, updating attributes will NOT automatically update the mtime.

    Parameters

    • attributes: Attribute

      The new attributes to update on the Node attributes

    Returns void

  • Update the mtime if exists

    Returns void