本文整理汇总了TypeScript中webpack.InputFileSystem类的典型用法代码示例。如果您正苦于以下问题:TypeScript InputFileSystem类的具体用法?TypeScript InputFileSystem怎么用?TypeScript InputFileSystem使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了InputFileSystem类的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的TypeScript代码示例。
示例1: readFile
readFile(path: string, callback: (err: Error, contents: Buffer) => void): void {
const result = this._readFileSync(path);
if (result) {
// tslint:disable-next-line:no-any
callback(null as any, result);
} else {
this._inputFileSystem.readFile(path, callback);
}
}
示例2: stat
stat(path: string, callback: (err: Error, stats: Stats) => void): void {
const result = this._statSync(path);
if (result) {
// tslint:disable-next-line:no-any
callback(null as any, result);
} else {
this._inputFileSystem.stat(path, callback);
}
}
示例3: Observable
return new Observable(obs => {
// TODO: remove this try+catch when issue https://github.com/ReactiveX/rxjs/issues/3740 is
// fixed.
try {
const data = this.inputFileSystem.readFileSync(getSystemPath(path));
obs.next(new Uint8Array(data).buffer as ArrayBuffer);
obs.complete();
} catch (e) {
obs.error(e);
}
});
示例4: readlinkSync
readlinkSync(path: string): string {
return this._inputFileSystem.readlinkSync(path);
}
示例5: readFileSync
readFileSync(path: string): Buffer {
const result = this._readFileSync(path);
return result || this._inputFileSystem.readFileSync(path);
}
示例6: statSync
statSync(path: string): Stats {
const result = this._statSync(path);
return result || this._inputFileSystem.statSync(path);
}
示例7: readlink
readlink(path: string, callback: (err: Error, linkString: string) => void): void {
this._inputFileSystem.readlink(path, callback);
}