/****************************************************************** MIT License http://www.opensource.org/licenses/mit-license.php Author Mora (https://github.com/qiu8310) *******************************************************************/ /// /** * 支持缓存的文件 * * 避免频繁去读取文件系统 * * @export * @class File */ export declare class CacheableFile { private filepath; private ctime?; private mtime?; private cachedContent; /** 用于标识 getContent 是不是从 Cache 中取出的 */ cached?: boolean; constructor(filepath: string); /** * 获取文件内容(如果文件没有更新过,优先使用缓存) * * @returns Promise * @memberof CacheableFile */ getContent(): Promise; }