MCPcopy
hub / github.com/angular/angular-cli / DelegateTree

Class DelegateTree

packages/angular_devkit/schematics/src/tree/delegate.ts:30–97  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

28
29// eslint-disable-next-line @typescript-eslint/no-unsafe-declaration-merging
30export class DelegateTree implements Tree {
31 constructor(protected _other: Tree) {
32 this[TreeSymbol] = () => this;
33 }
34
35 branch(): Tree {
36 return this._other.branch();
37 }
38 merge(other: Tree, strategy?: MergeStrategy): void {
39 this._other.merge(other, strategy);
40 }
41
42 get root(): DirEntry {
43 return this._other.root;
44 }
45
46 // Readonly.
47 read(path: string): Buffer | null {
48 return this._other.read(path);
49 }
50 readText(path: string): string {
51 return this._other.readText(path);
52 }
53 readJson(path: string): JsonValue {
54 return this._other.readJson(path);
55 }
56 exists(path: string): boolean {
57 return this._other.exists(path);
58 }
59 get(path: string): FileEntry | null {
60 return this._other.get(path);
61 }
62 getDir(path: string): DirEntry {
63 return this._other.getDir(path);
64 }
65 visit(visitor: FileVisitor): void {
66 return this._other.visit(visitor);
67 }
68
69 // Change content of host files.
70 overwrite(path: string, content: Buffer | string): void {
71 return this._other.overwrite(path, content);
72 }
73 beginUpdate(path: string): UpdateRecorder {
74 return this._other.beginUpdate(path);
75 }
76 commitUpdate(record: UpdateRecorder): void {
77 return this._other.commitUpdate(record);
78 }
79
80 // Structural methods.
81 create(path: string, content: Buffer | string): void {
82 return this._other.create(path, content);
83 }
84 delete(path: string): void {
85 return this._other.delete(path);
86 }
87 rename(from: string, to: string): void {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected