WHFSFile | WebHare Platform SDK
WebHare Platform SDK
    Preparing search index...

    Interface WHFSFile

    interface WHFSFile {
        dbrecord: FsObjectRow;
        get contentModified(): null | Instant;
        get created(): Instant;
        get data(): ResourceDescriptor;
        get description(): string;
        get fileLink(): null | number;
        get firstPublish(): null | Instant;
        get id(): number;
        get isFile(): true;
        get isFolder(): false;
        get isPinned(): boolean;
        get isUnlisted(): boolean;
        get keywords(): string;
        get link(): null | string;
        get modified(): Instant;
        get name(): string;
        get ordering(): number;
        get parent(): null | number;
        get parentSite(): null | number;
        get publish(): boolean;
        get sitePath(): null | string;
        get title(): string;
        get type(): string;
        get whfsPath(): string;
        _doUpdate(
            metadata: UpdateFileMetadata | UpdateFolderMetadata,
        ): Promise<void>;
        delete(): Promise<void>;
        describeType(): Promise<FileTypeInfo>;
        getEventMasks(types?: ("default" | "history" | "publication")[]): string[];
        getPreviewLink(
            options?: { password?: string; validUntil: WaitPeriod },
        ): Promise<string>;
        listInstances(options?: ListInstancesOptions): Promise<ListInstancesResult>;
        openParent(
            __namedParameters?: { allowRoot?: boolean },
        ): Promise<WHFSFolder>;
        recycle(): Promise<void>;
        refresh(options: { allowMissing: true }): Promise<boolean>;
        refresh(options?: { allowMissing?: boolean }): Promise<true>;
        republish(): Promise<void>;
        update(metadata: UpdateFileMetadata): Promise<void>;
    }

    Hierarchy

    • WHFSBaseObject
      • WHFSFile
    Index

    Properties

    dbrecord: FsObjectRow

    Accessors

    • get contentModified(): null | Instant

      Returns null | Instant

    • get created(): Instant

      Returns Instant

    • get description(): string

      Returns string

    • Returns null | number

    • get firstPublish(): null | Instant

      Returns null | Instant

    • get id(): number

      Returns number

    • get isFile(): true

      Returns true

    • get isFolder(): false

      Returns false

    • get isPinned(): boolean

      Returns boolean

    • get isUnlisted(): boolean

      Returns boolean

    • get keywords(): string

      Returns string

    • Returns null | string

    • get modified(): Instant

      Returns Instant

    • get name(): string

      Returns string

    • get ordering(): number

      Returns number

    • get parent(): null | number

      Returns null | number

    • get parentSite(): null | number

      Returns null | number

    • get publish(): boolean

      Returns boolean

    • get sitePath(): null | string

      Returns null | string

    • get title(): string

      Returns string

    • get type(): string

      Returns string

    • get whfsPath(): string

      Returns string

    Methods

    • Returns Promise<void>

    • Describe this object's type

      Returns Promise<FileTypeInfo>

    • Parameters

      • types: ("default" | "history" | "publication")[] = ...

      Returns string[]

    • Get a preview link for a document

      Parameters

      • Optionaloptions: { password?: string; validUntil: WaitPeriod }
        • Optionalpassword?: string

          Password to protect the preview with

        • validUntil: WaitPeriod

          Validity of the link. Defaults to 1 day

      Returns Promise<string>

    • Parameters

      • Optionaloptions: ListInstancesOptions

      Returns Promise<ListInstancesResult>

    • Open the parent folder for this object

      Parameters

      • __namedParameters: { allowRoot?: boolean } = {}

      Returns Promise<WHFSFolder>

      Error if this is a root subfolder

    • Returns Promise<void>

    • Re-read cached data from the database, returns whether the object still exists

      Parameters

      • options: { allowMissing: true }

      Returns Promise<boolean>

    • Re-read cached data from the database, throws when the object doesn't exist anymore

      Parameters

      • Optionaloptions: { allowMissing?: boolean }

      Returns Promise<true>

    • Returns Promise<void>