1 |
|
2 |
|
3 |
|
4 |
|
5 |
|
6 |
|
7 |
|
8 |
|
9 | import { JsonValue, Path, PathFragment } from '@angular-devkit/core';
|
10 | import { Action } from './action';
|
11 | import { DirEntry, FileEntry, FileVisitor, MergeStrategy, Tree, UpdateRecorder } from './interface';
|
12 | declare class ScopedDirEntry implements DirEntry {
|
13 | private _base;
|
14 | readonly scope: Path;
|
15 | constructor(_base: DirEntry, scope: Path);
|
16 | get parent(): DirEntry | null;
|
17 | get path(): Path;
|
18 | get subdirs(): PathFragment[];
|
19 | get subfiles(): PathFragment[];
|
20 | dir(name: PathFragment): DirEntry;
|
21 | file(name: PathFragment): FileEntry | null;
|
22 | visit(visitor: FileVisitor): void;
|
23 | }
|
24 | export declare class ScopedTree implements Tree {
|
25 | private _base;
|
26 | readonly _root: ScopedDirEntry;
|
27 | constructor(_base: Tree, scope: string);
|
28 | get root(): DirEntry;
|
29 | branch(): Tree;
|
30 | merge(other: Tree, strategy?: MergeStrategy): void;
|
31 | read(path: string): Buffer | null;
|
32 | readText(path: string): string;
|
33 | readJson(path: string): JsonValue;
|
34 | exists(path: string): boolean;
|
35 | get(path: string): FileEntry | null;
|
36 | getDir(path: string): DirEntry;
|
37 | visit(visitor: FileVisitor): void;
|
38 | overwrite(path: string, content: Buffer | string): void;
|
39 | beginUpdate(path: string): UpdateRecorder;
|
40 | commitUpdate(record: UpdateRecorder): void;
|
41 | create(path: string, content: Buffer | string): void;
|
42 | delete(path: string): void;
|
43 | rename(from: string, to: string): void;
|
44 | apply(action: Action, strategy?: MergeStrategy): void;
|
45 | get actions(): Action[];
|
46 | private _fullPath;
|
47 | private _fullPathAction;
|
48 | }
|
49 | export {};
|