/** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ import { Observable } from 'rxjs'; import { Path, PathFragment } from '../path'; import { FileBuffer, Host, HostCapabilities, HostWatchEvent, HostWatchEventType, HostWatchOptions, Stats } from './interface'; export interface SimpleMemoryHostStats { readonly content: FileBuffer | null; } export declare class SimpleMemoryHost implements Host<{}> { protected _cache: Map>; private _watchers; protected _newDirStats(): { inspect(): string; isFile(): boolean; isDirectory(): boolean; size: number; atime: Date; ctime: Date; mtime: Date; birthtime: Date; content: null; }; protected _newFileStats(content: FileBuffer, oldStats?: Stats): { inspect(): string; isFile(): boolean; isDirectory(): boolean; size: number; atime: Date; ctime: Date; mtime: Date; birthtime: Date; content: ArrayBuffer; }; constructor(); protected _toAbsolute(path: Path): Path; protected _updateWatchers(path: Path, type: HostWatchEventType): void; get capabilities(): HostCapabilities; /** * List of protected methods that give direct access outside the observables to the cache * and internal states. */ protected _write(path: Path, content: FileBuffer): void; protected _read(path: Path): FileBuffer; protected _delete(path: Path): void; protected _rename(from: Path, to: Path): void; protected _list(path: Path): PathFragment[]; protected _exists(path: Path): boolean; protected _isDirectory(path: Path): boolean; protected _isFile(path: Path): boolean; protected _stat(path: Path): Stats | null; protected _watch(path: Path, options?: HostWatchOptions): Observable; write(path: Path, content: FileBuffer): Observable; read(path: Path): Observable; delete(path: Path): Observable; rename(from: Path, to: Path): Observable; list(path: Path): Observable; exists(path: Path): Observable; isDirectory(path: Path): Observable; isFile(path: Path): Observable; stat(path: Path): Observable | null> | null; watch(path: Path, options?: HostWatchOptions): Observable | null; reset(): void; }