UNPKG

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