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 | import { Observable } from 'rxjs';
|
---|
9 | import { BaseException } from '../../exception';
|
---|
10 | import { Path, PathFragment } from '../path';
|
---|
11 | import { FileBuffer, FileBufferLike, Host, HostCapabilities, HostWatchEvent, HostWatchOptions, Stats } from './interface';
|
---|
12 | export declare class SynchronousDelegateExpectedException extends BaseException {
|
---|
13 | constructor();
|
---|
14 | }
|
---|
15 | /**
|
---|
16 | * Implement a synchronous-only host interface (remove the Observable parts).
|
---|
17 | */
|
---|
18 | export declare class SyncDelegateHost<T extends object = {}> {
|
---|
19 | protected _delegate: Host<T>;
|
---|
20 | constructor(_delegate: Host<T>);
|
---|
21 | protected _doSyncCall<ResultT>(observable: Observable<ResultT>): ResultT;
|
---|
22 | get capabilities(): HostCapabilities;
|
---|
23 | get delegate(): Host<T>;
|
---|
24 | write(path: Path, content: FileBufferLike): void;
|
---|
25 | read(path: Path): FileBuffer;
|
---|
26 | delete(path: Path): void;
|
---|
27 | rename(from: Path, to: Path): void;
|
---|
28 | list(path: Path): PathFragment[];
|
---|
29 | exists(path: Path): boolean;
|
---|
30 | isDirectory(path: Path): boolean;
|
---|
31 | isFile(path: Path): boolean;
|
---|
32 | stat(path: Path): Stats<T> | null;
|
---|
33 | watch(path: Path, options?: HostWatchOptions): Observable<HostWatchEvent> | null;
|
---|
34 | }
|
---|