import { fs, IFileInfo, IStat } from './interfaces.js'; import { Abortable } from 'events'; /** * Functional-style wrappers kept for compatibility and composability - * each delegates to its imperative counterpart in helpers.ts. */ /** * Gets filesystem by its name * * @param fileSystem filesystem name ( must be defined in config file) or instance * @returns */ export declare function _fs(fileSystem: string | fs): () => fs | undefined; /** * * Zips files to file * * @param srcPath files or dirs to zip ( absolute path, or relative to src fs ). if no provided, temp fs is used * @param dstName - relative to dst fs * @param srcFs - source provider name / instance ( temp fs when omitted ) * @param dstFs - optional destination provider - archive lands in srcFs when omitted * @returns absolute path to zipped file */ export declare function _zip(srcPath: string[], dstName: string, srcFs?: string | fs, dstFs?: string | fs): Promise; export declare function _unzip(srcPath: string, dstName: string, srcFs?: string | fs): Promise; /** * * Gets file information ( extended file information eg. movie fps, coded etc.) * * @param path abs path to file * @returns */ export declare function _fileInfo(path: string): Promise; /** * Calculates file hash * @param path abs path to file * @returns */ export declare function _fileHash(path: string): Promise; /** * Checks if a path exists. * * Without a filesystem, checks an absolute local path directly. With a filesystem * ( name or instance ), delegates to that provider ( path relative to its base ). * * @param path path to check * @param fileSystem optional provider name / instance */ export declare function _exists(path: string, fileSystem?: string | fs): () => Promise; /** * Reads whole file content through a filesystem provider. * * @param path path relative to provider base * @param encoding optional encoding ( raw Buffer when omitted ) * @param fileSystem provider name / instance, or default provider */ export declare function _read(path: string, encoding?: BufferEncoding, fileSystem?: string | fs): Promise; /** * Writes data to a file through a filesystem provider. */ export declare function _write(path: string, data: string | Uint8Array, encoding?: BufferEncoding, fileSystem?: string | fs): Promise; /** * Appends data to a file through a filesystem provider. */ export declare function _append(path: string, data: string | Uint8Array, encoding?: BufferEncoding, fileSystem?: string | fs): Promise; /** * Copies a file / dir, optionally into another filesystem. * * @param src source path ( relative to srcFs ) * @param dst destination path * @param srcFs source provider name / instance ( default provider when omitted ) * @param dstFs optional destination provider - copy within srcFs when omitted */ export declare function _copy(src: string, dst: string, srcFs?: string | fs, dstFs?: string | fs): Promise; /** * Moves a file / dir, optionally into another filesystem. */ export declare function _move(src: string, dst: string, srcFs?: string | fs, dstFs?: string | fs): Promise; /** * Renames a file within a single filesystem. */ export declare function _rename(oldPath: string, newPath: string, fileSystem?: string | fs): Promise; /** * Removes a file or a directory ( recursively ). */ export declare function _rm(path: string, fileSystem?: string | fs): Promise; /** * Creates a directory ( recursively ). */ export declare function _mkdir(path: string, fileSystem?: string | fs): Promise; /** * Lists directory content. */ export declare function _list(path: string, fileSystem?: string | fs): Promise; /** * Returns file / dir statistics. */ export declare function _stat(path: string, fileSystem?: string | fs): Promise; /** * Checks if a path is an existing directory. */ export declare function _dirExists(path: string, fileSystem?: string | fs): Promise; /** * Checks if a path is a directory. */ export declare function _isDir(path: string, fileSystem?: string | fs): Promise; /** * Downloads a file to local storage and returns the local path. */ export declare function _download(path: string, fileSystem?: string | fs): Promise; /** * Uploads a local file into a filesystem provider. */ export declare function _upload(srcPath: string, dstPath?: string, fileSystem?: string | fs): Promise; /** * Hashes a file through a filesystem provider. */ export declare function _hash(path: string, algo?: string, fileSystem?: string | fs): Promise; export declare function _isOfType(path: string, extension: string): () => Promise; export declare function _isOfMimetype(path: string, mimetype: string): () => Promise; export declare function _readFile(path: string, options?: ({ encoding?: null | undefined; flag?: string | undefined; } & Abortable) | undefined | null): () => Promise; //# sourceMappingURL=fp.d.ts.map