import { FsHelper } from '../helper'; import { CopyOrMoveInputInterface, GetFileLocalReturnInterface, GetFileStatsLocalOptionsType, GetFileStatsLocalReturnInterface, GetFileStreamLocalOptionsInterface, GetFilesCursorLocalOptions, GetFilesCursorLocalReturnType, MoveReturnType, StorageLocalOptionsType, StorageOptionsLocalInterface, UploadFileLocalOptionsInterface, UploadFileLocalReturnInterface } from '../interface'; import { FileType } from '../type'; import { AbstractStorage } from './abstract.storage'; export declare class LocalStorage extends AbstractStorage { private readonly localStorageOptions; private readonly fsHelper; private static localStorageDefaultOptions; constructor(localStorageOptions: StorageOptionsLocalInterface, fsHelper: FsHelper); get options(): StorageLocalOptionsType; /** * @throws InvalidPathError * @throws FileDoesNotExistError * @throws FileManagerError */ copy({ to, from }: CopyOrMoveInputInterface): Promise; /** * @param {CopyOrMoveInputInterface} inputs * * @return {Promise[]>} */ copyMany(inputs: CopyOrMoveInputInterface[]): Promise[]>; /** * @throws InvalidPathError * @throws FileDoesNotExistError * @throws FileManagerError */ move({ to, from }: CopyOrMoveInputInterface): Promise; moveMany(inputs: CopyOrMoveInputInterface[]): Promise[]>; /** * @throws InvalidPathError * @throws FileDoesNotExistError * @throws FileManagerError */ delete(relativePath: string): Promise; deleteMany(relativePaths: string[]): Promise[]>; /** * @throws FileManagerError * @throws FileTypeError * @throws FileDownloadError */ upload(file: FileType, options?: UploadFileLocalOptionsInterface): Promise; uploadMany(files: FileType[], options?: UploadFileLocalOptionsInterface): Promise[]>; /** * @throws FileManagerError * @throws FileTypeError */ getFilesCursor(options?: GetFilesCursorLocalOptions): GetFilesCursorLocalReturnType; /** * @throws InvalidPathError */ doesFileExist(relativePath: string): Promise; doesFileExistMany(relativePaths: string[]): Promise[]>; /** * @throws InvalidPathError * @throws FileDoesNotExistError * @throws FileManagerError * @throws FileTypeError */ getFileStats(relativePath: string, options?: GetFileStatsLocalOptionsType): Promise; /** * @throws InvalidPathError * @throws FileDoesNotExistError * @throws FileManagerError * @throws FileTypeError */ getFile(relativePath: string, options?: GetFileStreamLocalOptionsInterface): Promise; private writeToDisk; private writeSteam; getSafePath(filePath: string): string; private getRelativePath; private internalGetFileStats; private processFileBatch; private generateFullPath; private getStoragePath; }