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" />
|
---|
9 | import { 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 | exists(path: string): boolean;
|
---|
33 | get(path: string): FileEntry | null;
|
---|
34 | getDir(path: string): DirEntry;
|
---|
35 | visit(visitor: FileVisitor): void;
|
---|
36 | overwrite(path: string, content: Buffer | string): void;
|
---|
37 | beginUpdate(path: string): UpdateRecorder;
|
---|
38 | commitUpdate(record: UpdateRecorder): void;
|
---|
39 | create(path: string, content: Buffer | string): void;
|
---|
40 | delete(path: string): void;
|
---|
41 | rename(from: string, to: string): void;
|
---|
42 | apply(action: Action, strategy?: MergeStrategy): void;
|
---|
43 | get actions(): Action[];
|
---|
44 | private _fullPath;
|
---|
45 | private _fullPathAction;
|
---|
46 | }
|
---|
47 | export {};
|
---|