From ae187b6d75c8079da0be1dc288613bad8466fe61 Mon Sep 17 00:00:00 2001 From: RaindropsSys Date: Tue, 24 Oct 2023 17:43:37 +0200 Subject: Initial commit --- .../build/src/fs/FileDescriptorQueue.d.ts | 30 ++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 desktop/node_modules/dir-compare/build/src/fs/FileDescriptorQueue.d.ts (limited to 'desktop/node_modules/dir-compare/build/src/fs/FileDescriptorQueue.d.ts') diff --git a/desktop/node_modules/dir-compare/build/src/fs/FileDescriptorQueue.d.ts b/desktop/node_modules/dir-compare/build/src/fs/FileDescriptorQueue.d.ts new file mode 100644 index 0000000..c0dc67f --- /dev/null +++ b/desktop/node_modules/dir-compare/build/src/fs/FileDescriptorQueue.d.ts @@ -0,0 +1,30 @@ +/// +import { NoParamCallback } from 'fs'; +declare type OpenFileFlags = string | undefined; +declare type OpenFileCallback = (err: NodeJS.ErrnoException | null, fd: number) => void; +/** + * Limits the number of concurrent file handlers. + * Use it as a wrapper over fs.open() and fs.close(). + * Example: + * const fdQueue = new FileDescriptorQueue(8) + * fdQueue.open(path, flags, (err, fd) =>{ + * ... + * fdQueue.close(fd, (err) =>{ + * ... + * }) + * }) + * As of node v7, calling fd.close without a callback is deprecated. + */ +export declare class FileDescriptorQueue { + private maxFilesNo; + private activeCount; + private pendingJobs; + constructor(maxFilesNo: number); + open(path: string, flags: OpenFileFlags, callback: OpenFileCallback): void; + process(): void; + close(fd: number, callback: NoParamCallback): void; + openPromise(path: string, flags: OpenFileFlags): Promise; + closePromise(fd: number): Promise; +} +export {}; +//# sourceMappingURL=FileDescriptorQueue.d.ts.map \ No newline at end of file -- cgit