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

    Interface WHFSFile

    interface WHFSFile {
        dbrecord: FsObjectRow;
        get contentModified(): Instant | null;
        get created(): Instant;
        get data(): ResourceDescriptor | null;
        get description(): string;
        get fileLink(): number | null;
        get firstPublish(): Instant | null;
        get id(): number;
        get isFile(): true;
        get isFolder(): false;
        get isPinned(): boolean;
        get isUnlisted(): boolean;
        get keywords(): string;
        get link(): string | null;
        get modified(): Instant;
        get modifiedBy(): AuthorizationInterface | null;
        get name(): string;
        get objectBaseURL(): string | null;
        get order(): number;
        get parent(): number | null;
        get parentSite(): number | null;
        get publish(): boolean;
        get sitePath(): string | null;
        get snapshotFor(): number | null;
        get target(): IntExtLink | null;
        get title(): string;
        get type(): keyof WHFSTypes;
        get whfsPath(): string;
        _doUpdate(
            metadata: UpdateFileMetadata | UpdateFolderMetadata,
        ): Promise<void>;
        delete(): Promise<void>;
        describeType(): Promise<FileTypeInfo>;
        getEventMasks(types?: ("default" | "publication" | "history")[]): string[];
        getPreviewLink(
            options?: { password?: string; validUntil: WaitPeriod },
        ): Promise<string>;
        listHistory(): Promise<HistoryEntry[]>;
        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(): Instant | null

      Returns Instant | null

    • get created(): Instant

      Returns Instant

    • get description(): string

      Returns string

    • Returns number | null

    • get firstPublish(): Instant | null

      Returns Instant | null

    • 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 string | null

    • get modified(): Instant

      Returns Instant

    • get name(): string

      Returns string

    • get objectBaseURL(): string | null

      The URL of the object itself. For folders this is the folder's base URL (unlike 'link', which is the URL of its index document). null if the object has no URL

      Returns string | null

    • get order(): number

      Returns number

    • get parent(): number | null

      Returns number | null

    • get parentSite(): number | null

      Returns number | null

    • get publish(): boolean

      Returns boolean

    • get sitePath(): string | null

      Returns string | null

    • get snapshotFor(): number | null

      Returns number | null

    • get title(): string

      Returns string

    • get type(): keyof WHFSTypes

      Returns keyof WHFSTypes

    • get whfsPath(): string

      Returns string

    Methods

    • Returns Promise<void>

    • Describe this object's type

      Returns Promise<FileTypeInfo>

    • Parameters

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

      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>

    • Returns Promise<HistoryEntry[]>

    • 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>