Interface of the File class

interface IFile {
    attributes: Attribute;
    basename: string;
    crtime: undefined | Date;
    data: NodeData;
    dirname: string;
    displayname: string;
    encodedSource: string;
    extension: null | string;
    fileid: undefined | number;
    isDavRessource: boolean;
    mime: undefined | string;
    mtime: undefined | Date;
    owner: null | string;
    path: string;
    permissions: Permission;
    root: null | string;
    size: undefined | number;
    source: string;
    status: undefined | NodeStatus;
    type: File;
    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: null | string
fileid: undefined | number
isDavRessource: boolean
mime: undefined | string
mtime: undefined | Date
owner: null | string
path: string
permissions: Permission
root: null | string
size: undefined | number
source: string
status: undefined | NodeStatus
type: File

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