1 | "use strict";
|
---|
2 | /**
|
---|
3 | * @license
|
---|
4 | * Copyright Google LLC All Rights Reserved.
|
---|
5 | *
|
---|
6 | * Use of this source code is governed by an MIT-style license that can be
|
---|
7 | * found in the LICENSE file at https://angular.io/license
|
---|
8 | */
|
---|
9 | Object.defineProperty(exports, "__esModule", { value: true });
|
---|
10 | exports.ResolverHost = void 0;
|
---|
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 | class ResolverHost {
|
---|
16 | constructor(_delegate) {
|
---|
17 | this._delegate = _delegate;
|
---|
18 | }
|
---|
19 | get capabilities() {
|
---|
20 | return this._delegate.capabilities;
|
---|
21 | }
|
---|
22 | write(path, content) {
|
---|
23 | return this._delegate.write(this._resolve(path), content);
|
---|
24 | }
|
---|
25 | read(path) {
|
---|
26 | return this._delegate.read(this._resolve(path));
|
---|
27 | }
|
---|
28 | delete(path) {
|
---|
29 | return this._delegate.delete(this._resolve(path));
|
---|
30 | }
|
---|
31 | rename(from, to) {
|
---|
32 | return this._delegate.rename(this._resolve(from), this._resolve(to));
|
---|
33 | }
|
---|
34 | list(path) {
|
---|
35 | return this._delegate.list(this._resolve(path));
|
---|
36 | }
|
---|
37 | exists(path) {
|
---|
38 | return this._delegate.exists(this._resolve(path));
|
---|
39 | }
|
---|
40 | isDirectory(path) {
|
---|
41 | return this._delegate.isDirectory(this._resolve(path));
|
---|
42 | }
|
---|
43 | isFile(path) {
|
---|
44 | return this._delegate.isFile(this._resolve(path));
|
---|
45 | }
|
---|
46 | // Some hosts may not support stat.
|
---|
47 | stat(path) {
|
---|
48 | return this._delegate.stat(this._resolve(path));
|
---|
49 | }
|
---|
50 | // Some hosts may not support watching.
|
---|
51 | watch(path, options) {
|
---|
52 | return this._delegate.watch(this._resolve(path), options);
|
---|
53 | }
|
---|
54 | }
|
---|
55 | exports.ResolverHost = ResolverHost;
|
---|