@stryke/fs
Version:
A package containing various file system utilities that expand the functionality of NodeJs's built-in `fs` module.
38 lines (37 loc) • 1.68 kB
text/typescript
import { AssetGlob } from "@stryke/types/file";
//#region src/copy-file.d.ts
/**
* Copy a file from one location to another
*
* @param source - The file to copy, this can be a file, directory, URL, or glob pattern
* @param destination - The destination location
* @returns An indicator specifying if the copy was successful
*/
declare function copyFile(source: string | URL, destination: string | URL): Promise<void>;
/**
* Synchronously copy a file from one location to another
*
* @param source - The file to copy, this can be a file, directory, URL, or glob pattern
* @param destination - The destination location
* @returns An indicator specifying if the copy was successful
*/
declare function copyFileSync(source: string | URL, destination: string | URL): void;
/**
* Copy files from one location to another
*
* @param source - The source location, this can be a file, directory, URL, or glob pattern
* @param destination - The destination location
* @returns An indicator specifying if the copy was successful
*/
declare function copyFiles(source: string | URL | Omit<AssetGlob, "output">, destination: string | URL): Promise<void | void[]>;
/**
* Synchronously copy files from one location to another
*
* @param source - The source location, this can be a file, directory, URL, or glob pattern
* @param destination - The destination location
* @returns An indicator specifying if the copy was successful
*/
declare function copyFilesSync(source: string | URL | Omit<AssetGlob, "output">, destination: string | URL): void | void[];
//#endregion
export { copyFile, copyFileSync, copyFiles, copyFilesSync };
//# sourceMappingURL=copy-file.d.cts.map