import Immutable from "immutable"; import File from "./file"; import Promise from "../utils/promise"; declare const FS_base: Immutable.Record.Class; declare class FS extends FS_base { /** Return path to the root @return {string} */ getRoot(): string; /** Verify that a file is in the fs scope @param {string} filename @return {boolean} */ isInScope(filename: string): boolean; /** Resolve a file in this FS @return {string} */ resolve(...args: string[]): string; /** Check if a file exists, run a Promise(true) if that's the case, Promise(false) otherwise @param {string} filename @return {Promise} */ exists(filename: string): Promise; /** Read a file and returns a promise with the content as a buffer @param {string} filename @return {Promise} */ read(filename: string): Promise; /** Read a file as a string (utf-8) @return {Promise} */ readAsString(filename: string, encoding?: string): Promise; /** Read file as a stream @param {string} filename @return {Promise} */ readAsStream(filename: string): any; /** Read stat infos about a file @param {string} filename @return {Promise} */ statFile(filename: string): Promise; /** List files/directories in a directory. Directories ends with '/' @param {string} dirname @return {Promise>} */ readDir(dirname: string): any; /** List only files in a diretcory Directories ends with '/' @param {string} dirname @return {Promise>} */ listFiles(dirname: string): any; /** List all files in a directory @param {string} dirName @param {Function(dirName)} filterFn: call it for each file/directory to test if it should stop iterating @return {Promise>} */ listAllFiles(dirName: string, filterFn: (arg0: string) => boolean): any; /** Find a file in a folder (case insensitive) Return the found filename @param {string} dirname @param {string} filename @return {Promise} */ findFile(dirname: string, filename: string): any; /** Load a JSON file By default, fs only supports JSON @param {string} filename @return {Promise} */ loadAsObject(filename: string): any; /** Create a FS instance @param {Object} def @return {FS} */ static create(def: any): FS; /** Create a new FS instance with a reduced scope @param {FS} fs @param {string} scope @return {FS} */ static reduceScope(fs: FS, scope: string): FS; } export default FS; //# sourceMappingURL=fs.d.ts.map