UNPKG

1.28 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.io/license
7 */
8/// <reference types="node" />
9import { JsonValue } from '@angular-devkit/core';
10import { Action } from './action';
11import { DirEntry, FileEntry, FileVisitor, MergeStrategy, Tree, UpdateRecorder } from './interface';
12export declare class DelegateTree implements Tree {
13 protected _other: Tree;
14 constructor(_other: Tree);
15 branch(): Tree;
16 merge(other: Tree, strategy?: MergeStrategy): void;
17 get root(): DirEntry;
18 read(path: string): Buffer | null;
19 readText(path: string): string;
20 readJson(path: string): JsonValue;
21 exists(path: string): boolean;
22 get(path: string): FileEntry | null;
23 getDir(path: string): DirEntry;
24 visit(visitor: FileVisitor): void;
25 overwrite(path: string, content: Buffer | string): void;
26 beginUpdate(path: string): UpdateRecorder;
27 commitUpdate(record: UpdateRecorder): void;
28 create(path: string, content: Buffer | string): void;
29 delete(path: string): void;
30 rename(from: string, to: string): void;
31 apply(action: Action, strategy?: MergeStrategy): void;
32 get actions(): Action[];
33}