magica
Version:
ImageMagick for browser and Node.js, easy setup, high level API and Command Line Interface, including WASM binary for an easy setup.
28 lines (27 loc) • 760 B
TypeScript
import { FS } from '../file/emscriptenFs';
interface Options {
/**
* Folder path to list files.
*/
path: string;
/**
* list files in given folder. Returns children files and folders base names.
*/
ls: (f: string) => string[];
/**
* return true if given file is a directory.
*/
isDir: (f: string) => boolean;
/**
* If true is returned the visit will stop.
*/
visitor: (f: LsRVisitorFile) => boolean;
}
export interface LsRVisitorFile {
path: string;
isDir: boolean;
}
export declare function lsR(o: Options): LsRVisitorFile[];
export declare function listFilesRecursively(path: string, FS: FS): LsRVisitorFile[];
export declare function ls(p: string, FS: FS): string[];
export {};