UNPKG

1.25 kBTypeScriptView Raw
1/**
2 * @license
3 * Copyright Google LLC All Rights Reserved.
4 *
5 * Use of this source code is governed by an MIT-style license that can be
6 * found in the LICENSE file at https://angular.dev/license
7 */
8import { JsonValue } from '@angular-devkit/core';
9import { Action } from './action';
10import { DirEntry, FileEntry, FileVisitor, MergeStrategy, Tree, UpdateRecorder } from './interface';
11export declare class DelegateTree implements Tree {
12 protected _other: Tree;
13 constructor(_other: Tree);
14 branch(): Tree;
15 merge(other: Tree, strategy?: MergeStrategy): void;
16 get root(): DirEntry;
17 read(path: string): Buffer | null;
18 readText(path: string): string;
19 readJson(path: string): JsonValue;
20 exists(path: string): boolean;
21 get(path: string): FileEntry | null;
22 getDir(path: string): DirEntry;
23 visit(visitor: FileVisitor): void;
24 overwrite(path: string, content: Buffer | string): void;
25 beginUpdate(path: string): UpdateRecorder;
26 commitUpdate(record: UpdateRecorder): void;
27 create(path: string, content: Buffer | string): void;
28 delete(path: string): void;
29 rename(from: string, to: string): void;
30 apply(action: Action, strategy?: MergeStrategy): void;
31 get actions(): Action[];
32}