UNPKG

1.21 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 { Path, virtualFs } from '@angular-devkit/core';
9import { Observable } from 'rxjs';
10import { CreateFileAction } from '../tree/action';
11import { SimpleSinkBase } from './sink';
12export declare class HostSink extends SimpleSinkBase {
13 protected _host: virtualFs.Host;
14 protected _force: boolean;
15 protected _filesToDelete: Set<Path>;
16 protected _filesToRename: Set<[Path, Path]>;
17 protected _filesToCreate: Map<Path, Buffer>;
18 protected _filesToUpdate: Map<Path, Buffer>;
19 constructor(_host: virtualFs.Host, _force?: boolean);
20 protected _validateCreateAction(action: CreateFileAction): Observable<void>;
21 protected _validateFileExists(p: Path): Observable<boolean>;
22 protected _overwriteFile(path: Path, content: Buffer): Observable<void>;
23 protected _createFile(path: Path, content: Buffer): Observable<void>;
24 protected _renameFile(from: Path, to: Path): Observable<void>;
25 protected _deleteFile(path: Path): Observable<void>;
26 _done(): Observable<void>;
27}