interface WebDAVClient {
    copyFile: (
        filename: string,
        destination: string,
        options?: CopyFileOptions,
    ) => Promise<void>;
    createDirectory: (
        path: string,
        options?: CreateDirectoryOptions,
    ) => Promise<void>;
    createReadStream: (
        filename: string,
        options?: CreateReadStreamOptions,
    ) => Readable;
    createWriteStream: (
        filename: string,
        options?: CreateWriteStreamOptions,
        callback?: CreateWriteStreamCallback,
    ) => Writable;
    customRequest: (
        path: string,
        requestOptions: RequestOptionsCustom,
    ) => Promise<Response>;
    deleteFile: (filename: string) => Promise<void>;
    exists: (path: string) => Promise<boolean>;
    getDAVCompliance: (path: string) => Promise<DAVCompliance>;
    getDirectoryContents: (
        path: string,
        options?: GetDirectoryContentsOptions,
    ) => Promise<FileStat[] | ResponseDataDetailed<FileStat[]>>;
    getFileContents: (
        filename: string,
        options?: GetFileContentsOptions,
    ) => Promise<
        string
        | BufferLike
        | ResponseDataDetailed<(string | BufferLike)>,
    >;
    getFileDownloadLink: (filename: string) => string;
    getFileUploadLink: (filename: string) => string;
    getHeaders: () => Headers;
    getQuota: (
        options?: GetQuotaOptions,
    ) => Promise<null | DiskQuota | ResponseDataDetailed<null | DiskQuota>>;
    lock: (path: string, options?: LockOptions) => Promise<LockResponse>;
    moveFile: (
        filename: string,
        destinationFilename: string,
        options?: MoveFileOptions,
    ) => Promise<void>;
    partialUpdateFileContents: (
        filePath: string,
        start: number,
        end: number,
        data: string | Readable | BufferLike,
        options?: WebDAVMethodOptions,
    ) => Promise<void>;
    putFileContents: (
        filename: string,
        data: string | Readable | BufferLike,
        options?: PutFileContentsOptions,
    ) => Promise<boolean>;
    search: (
        path: string,
        options?: SearchOptions,
    ) => Promise<SearchResult | ResponseDataDetailed<SearchResult>>;
    setHeaders: (headers: Headers) => void;
    stat: (
        path: string,
        options?: StatOptions,
    ) => Promise<FileStat | ResponseDataDetailed<FileStat>>;
    unlock: (
        path: string,
        token: string,
        options?: WebDAVMethodOptions,
    ) => Promise<void>;
}

Properties

copyFile: (
    filename: string,
    destination: string,
    options?: CopyFileOptions,
) => Promise<void>
createDirectory: (
    path: string,
    options?: CreateDirectoryOptions,
) => Promise<void>
createReadStream: (
    filename: string,
    options?: CreateReadStreamOptions,
) => Readable
createWriteStream: (
    filename: string,
    options?: CreateWriteStreamOptions,
    callback?: CreateWriteStreamCallback,
) => Writable
customRequest: (
    path: string,
    requestOptions: RequestOptionsCustom,
) => Promise<Response>
deleteFile: (filename: string) => Promise<void>
exists: (path: string) => Promise<boolean>
getDAVCompliance: (path: string) => Promise<DAVCompliance>
getDirectoryContents: (
    path: string,
    options?: GetDirectoryContentsOptions,
) => Promise<FileStat[] | ResponseDataDetailed<FileStat[]>>
getFileContents: (
    filename: string,
    options?: GetFileContentsOptions,
) => Promise<
    string
    | BufferLike
    | ResponseDataDetailed<(string | BufferLike)>,
>
getFileDownloadLink: (filename: string) => string
getFileUploadLink: (filename: string) => string
getHeaders: () => Headers
getQuota: (
    options?: GetQuotaOptions,
) => Promise<null | DiskQuota | ResponseDataDetailed<null | DiskQuota>>
lock: (path: string, options?: LockOptions) => Promise<LockResponse>
moveFile: (
    filename: string,
    destinationFilename: string,
    options?: MoveFileOptions,
) => Promise<void>
partialUpdateFileContents: (
    filePath: string,
    start: number,
    end: number,
    data: string | Readable | BufferLike,
    options?: WebDAVMethodOptions,
) => Promise<void>
putFileContents: (
    filename: string,
    data: string | Readable | BufferLike,
    options?: PutFileContentsOptions,
) => Promise<boolean>
search: (
    path: string,
    options?: SearchOptions,
) => Promise<SearchResult | ResponseDataDetailed<SearchResult>>
setHeaders: (headers: Headers) => void
stat: (
    path: string,
    options?: StatOptions,
) => Promise<FileStat | ResponseDataDetailed<FileStat>>
unlock: (
    path: string,
    token: string,
    options?: WebDAVMethodOptions,
) => Promise<void>