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 { Path, PathFragment } from '../path';
|
---|
10 | import { FileBuffer, Host, HostCapabilities, HostWatchEvent, HostWatchOptions, Stats } from './interface';
|
---|
11 | /**
|
---|
12 | * A Host that runs a method before calling its delegate. This is an abstract class and its actual
|
---|
13 | * behaviour is entirely dependant of the subclass.
|
---|
14 | */
|
---|
15 | export declare abstract class ResolverHost<T extends object> implements Host<T> {
|
---|
16 | protected _delegate: Host<T>;
|
---|
17 | protected abstract _resolve(path: Path): Path;
|
---|
18 | constructor(_delegate: Host<T>);
|
---|
19 | get capabilities(): HostCapabilities;
|
---|
20 | write(path: Path, content: FileBuffer): Observable<void>;
|
---|
21 | read(path: Path): Observable<FileBuffer>;
|
---|
22 | delete(path: Path): Observable<void>;
|
---|
23 | rename(from: Path, to: Path): Observable<void>;
|
---|
24 | list(path: Path): Observable<PathFragment[]>;
|
---|
25 | exists(path: Path): Observable<boolean>;
|
---|
26 | isDirectory(path: Path): Observable<boolean>;
|
---|
27 | isFile(path: Path): Observable<boolean>;
|
---|
28 | stat(path: Path): Observable<Stats<T> | null> | null;
|
---|
29 | watch(path: Path, options?: HostWatchOptions): Observable<HostWatchEvent> | null;
|
---|
30 | }
|
---|