The object store connector interface.

interface IObjectStoreConnector {
    calculateSize(path): Promise<number>;
    createFolder(path): Promise<void>;
    deleteObject(path): Promise<ObjectKind>;
    get(path): Promise<File>;
    list(path, recursive): Promise<ObjectDescriptor[]>;
    moveObject(path, newPath): Promise<ObjectKind>;
    writeFile(file, path?): Promise<void>;
}

Methods

  • Calculates the size of an object.

    Parameters

    • path: string

      The path to the object.

    Returns Promise<number>

    A promise that resolves with the size of the object.

  • Creates a folder.

    Parameters

    • path: string

      The path to the folder.

    Returns Promise<void>

    A promise that resolves when the folder is created.

  • Gets a file.

    Parameters

    • path: string

      The path to the file.

    Returns Promise<File>

    A promise that resolves with the file.

  • Lists the objects in a folder.

    Parameters

    • path: string

      The path to the folder.

    • recursive: boolean

      Whether to list the objects recursively.

    Returns Promise<ObjectDescriptor[]>

    A promise that resolves with an array of object descriptors.

  • Moves an object.

    Parameters

    • path: string

      The path to the object.

    • newPath: string

      The path to move the object to.

    Returns Promise<ObjectKind>

  • Writes a file.

    Parameters

    • file: File

      The file to write.

    • Optional path: string

      The path to write the file to.

    Returns Promise<void>

Generated using TypeDoc