UNPKG

snapshot-fs

Version:

Create a filesystem snapshot for use with memfs

20 lines 791 B
/** * Provides {@link toTree a function} to dump the contents of a `Volume`, * comparing it to the real filesystem. * * Portions of this code adapted from * https://github.com/streamich/memfs/blob/2c6a6ca55ad2e661f40e488fe5ea4087438bae0e/src/print/index.ts#L6-L30 * and are copyrighted by the original author and licesned under Apache-2.0. */ import type { Volume } from 'memfs'; import { sep } from 'path/posix'; export declare const toTree: (fs: Volume, { depth, separator, dir, formatNew, formatOverwrite, tab, }: ToTreeOptions) => string; export interface ToTreeOptions { depth?: number; dir?: string; formatNew?: (str: string) => string; formatOverwrite?: (str: string) => string; separator?: typeof sep; tab?: string; } //# sourceMappingURL=tree.d.ts.map