Ensuring node modules are up to date for running
This commit is contained in:
26
node_modules/@nodelib/fs.stat/src/adapters/fs.ts
generated
vendored
Normal file
26
node_modules/@nodelib/fs.stat/src/adapters/fs.ts
generated
vendored
Normal file
@@ -0,0 +1,26 @@
|
||||
import * as fs from 'fs';
|
||||
|
||||
export type FileSystemAdapter = {
|
||||
lstat: typeof fs.lstat;
|
||||
stat: typeof fs.stat;
|
||||
lstatSync: typeof fs.lstatSync;
|
||||
statSync: typeof fs.statSync;
|
||||
};
|
||||
|
||||
export const FILE_SYSTEM_ADAPTER: FileSystemAdapter = {
|
||||
lstat: fs.lstat,
|
||||
stat: fs.stat,
|
||||
lstatSync: fs.lstatSync,
|
||||
statSync: fs.statSync
|
||||
};
|
||||
|
||||
export function createFileSystemAdapter(fsMethods?: Partial<FileSystemAdapter>): FileSystemAdapter {
|
||||
if (fsMethods === undefined) {
|
||||
return FILE_SYSTEM_ADAPTER;
|
||||
}
|
||||
|
||||
return {
|
||||
...FILE_SYSTEM_ADAPTER,
|
||||
...fsMethods
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user