.
This commit is contained in:
		
							
								
								
									
										4
									
								
								qwen/nodejs/node_modules/@nodelib/fs.stat/out/providers/async.d.ts
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										4
									
								
								qwen/nodejs/node_modules/@nodelib/fs.stat/out/providers/async.d.ts
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							@@ -0,0 +1,4 @@
 | 
			
		||||
import type Settings from '../settings';
 | 
			
		||||
import type { ErrnoException, Stats } from '../types';
 | 
			
		||||
export declare type AsyncCallback = (error: ErrnoException, stats: Stats) => void;
 | 
			
		||||
export declare function read(path: string, settings: Settings, callback: AsyncCallback): void;
 | 
			
		||||
							
								
								
									
										36
									
								
								qwen/nodejs/node_modules/@nodelib/fs.stat/out/providers/async.js
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										36
									
								
								qwen/nodejs/node_modules/@nodelib/fs.stat/out/providers/async.js
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							@@ -0,0 +1,36 @@
 | 
			
		||||
"use strict";
 | 
			
		||||
Object.defineProperty(exports, "__esModule", { value: true });
 | 
			
		||||
exports.read = void 0;
 | 
			
		||||
function read(path, settings, callback) {
 | 
			
		||||
    settings.fs.lstat(path, (lstatError, lstat) => {
 | 
			
		||||
        if (lstatError !== null) {
 | 
			
		||||
            callFailureCallback(callback, lstatError);
 | 
			
		||||
            return;
 | 
			
		||||
        }
 | 
			
		||||
        if (!lstat.isSymbolicLink() || !settings.followSymbolicLink) {
 | 
			
		||||
            callSuccessCallback(callback, lstat);
 | 
			
		||||
            return;
 | 
			
		||||
        }
 | 
			
		||||
        settings.fs.stat(path, (statError, stat) => {
 | 
			
		||||
            if (statError !== null) {
 | 
			
		||||
                if (settings.throwErrorOnBrokenSymbolicLink) {
 | 
			
		||||
                    callFailureCallback(callback, statError);
 | 
			
		||||
                    return;
 | 
			
		||||
                }
 | 
			
		||||
                callSuccessCallback(callback, lstat);
 | 
			
		||||
                return;
 | 
			
		||||
            }
 | 
			
		||||
            if (settings.markSymbolicLink) {
 | 
			
		||||
                stat.isSymbolicLink = () => true;
 | 
			
		||||
            }
 | 
			
		||||
            callSuccessCallback(callback, stat);
 | 
			
		||||
        });
 | 
			
		||||
    });
 | 
			
		||||
}
 | 
			
		||||
exports.read = read;
 | 
			
		||||
function callFailureCallback(callback, error) {
 | 
			
		||||
    callback(error);
 | 
			
		||||
}
 | 
			
		||||
function callSuccessCallback(callback, result) {
 | 
			
		||||
    callback(null, result);
 | 
			
		||||
}
 | 
			
		||||
							
								
								
									
										3
									
								
								qwen/nodejs/node_modules/@nodelib/fs.stat/out/providers/sync.d.ts
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										3
									
								
								qwen/nodejs/node_modules/@nodelib/fs.stat/out/providers/sync.d.ts
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							@@ -0,0 +1,3 @@
 | 
			
		||||
import type Settings from '../settings';
 | 
			
		||||
import type { Stats } from '../types';
 | 
			
		||||
export declare function read(path: string, settings: Settings): Stats;
 | 
			
		||||
							
								
								
									
										23
									
								
								qwen/nodejs/node_modules/@nodelib/fs.stat/out/providers/sync.js
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										23
									
								
								qwen/nodejs/node_modules/@nodelib/fs.stat/out/providers/sync.js
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							@@ -0,0 +1,23 @@
 | 
			
		||||
"use strict";
 | 
			
		||||
Object.defineProperty(exports, "__esModule", { value: true });
 | 
			
		||||
exports.read = void 0;
 | 
			
		||||
function read(path, settings) {
 | 
			
		||||
    const lstat = settings.fs.lstatSync(path);
 | 
			
		||||
    if (!lstat.isSymbolicLink() || !settings.followSymbolicLink) {
 | 
			
		||||
        return lstat;
 | 
			
		||||
    }
 | 
			
		||||
    try {
 | 
			
		||||
        const stat = settings.fs.statSync(path);
 | 
			
		||||
        if (settings.markSymbolicLink) {
 | 
			
		||||
            stat.isSymbolicLink = () => true;
 | 
			
		||||
        }
 | 
			
		||||
        return stat;
 | 
			
		||||
    }
 | 
			
		||||
    catch (error) {
 | 
			
		||||
        if (!settings.throwErrorOnBrokenSymbolicLink) {
 | 
			
		||||
            return lstat;
 | 
			
		||||
        }
 | 
			
		||||
        throw error;
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
exports.read = read;
 | 
			
		||||
		Reference in New Issue
	
	Block a user