aboutsummaryrefslogtreecommitdiff
path: root/node_modules/@nodelib/fs.scandir/out/adapters
diff options
context:
space:
mode:
Diffstat (limited to 'node_modules/@nodelib/fs.scandir/out/adapters')
-rw-r--r--node_modules/@nodelib/fs.scandir/out/adapters/fs.d.ts20
-rw-r--r--node_modules/@nodelib/fs.scandir/out/adapters/fs.js19
2 files changed, 39 insertions, 0 deletions
diff --git a/node_modules/@nodelib/fs.scandir/out/adapters/fs.d.ts b/node_modules/@nodelib/fs.scandir/out/adapters/fs.d.ts
new file mode 100644
index 0000000..827f1db
--- /dev/null
+++ b/node_modules/@nodelib/fs.scandir/out/adapters/fs.d.ts
@@ -0,0 +1,20 @@
+import type * as fsStat from '@nodelib/fs.stat';
+import type { Dirent, ErrnoException } from '../types';
+export interface ReaddirAsynchronousMethod {
+ (filepath: string, options: {
+ withFileTypes: true;
+ }, callback: (error: ErrnoException | null, files: Dirent[]) => void): void;
+ (filepath: string, callback: (error: ErrnoException | null, files: string[]) => void): void;
+}
+export interface ReaddirSynchronousMethod {
+ (filepath: string, options: {
+ withFileTypes: true;
+ }): Dirent[];
+ (filepath: string): string[];
+}
+export declare type FileSystemAdapter = fsStat.FileSystemAdapter & {
+ readdir: ReaddirAsynchronousMethod;
+ readdirSync: ReaddirSynchronousMethod;
+};
+export declare const FILE_SYSTEM_ADAPTER: FileSystemAdapter;
+export declare function createFileSystemAdapter(fsMethods?: Partial<FileSystemAdapter>): FileSystemAdapter;
diff --git a/node_modules/@nodelib/fs.scandir/out/adapters/fs.js b/node_modules/@nodelib/fs.scandir/out/adapters/fs.js
new file mode 100644
index 0000000..f0fe022
--- /dev/null
+++ b/node_modules/@nodelib/fs.scandir/out/adapters/fs.js
@@ -0,0 +1,19 @@
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+exports.createFileSystemAdapter = exports.FILE_SYSTEM_ADAPTER = void 0;
+const fs = require("fs");
+exports.FILE_SYSTEM_ADAPTER = {
+ lstat: fs.lstat,
+ stat: fs.stat,
+ lstatSync: fs.lstatSync,
+ statSync: fs.statSync,
+ readdir: fs.readdir,
+ readdirSync: fs.readdirSync
+};
+function createFileSystemAdapter(fsMethods) {
+ if (fsMethods === undefined) {
+ return exports.FILE_SYSTEM_ADAPTER;
+ }
+ return Object.assign(Object.assign({}, exports.FILE_SYSTEM_ADAPTER), fsMethods);
+}
+exports.createFileSystemAdapter = createFileSystemAdapter;