UNPKG

@mdfriday/foundry

Version:

The core engine of MDFriday. Convert Markdown and shortcodes into fully themed static sites – Hugo-style, powered by TypeScript.

26 lines (25 loc) 1.17 kB
import { Fs, File, FileInfo } from '@internal/domain/fs/type'; export declare class MockFs implements Fs { private files; private directories; setFile(filePath: string, content: string): void; private addDirectoryPath; create(name: string): Promise<File>; mkdir(name: string, perm: number): Promise<void>; mkdirAll(dirPath: string, perm: number): Promise<void>; open(name: string): Promise<File>; openFile(name: string, flag: number, perm: number): Promise<File>; remove(name: string): Promise<void>; removeAll(dirPath: string): Promise<void>; rename(oldname: string, newname: string): Promise<void>; stat(name: string): Promise<FileInfo>; name(): string; chmod(name: string, mode: number): Promise<void>; chown(name: string, uid: number, gid: number): Promise<void>; chtimes(name: string, atime: Date, mtime: Date): Promise<void>; readFile(filePath: string): Promise<Buffer>; writeFile(filePath: string, data: Buffer | string): Promise<void>; exists(filePath: string): Promise<boolean>; readDir(dirPath: string): Promise<string[]>; copy(src: string, dest: string): Promise<void>; }