Socket
Socket
Sign inDemoInstall

@nodelib/fs.stat

Package Overview
Dependencies
0
Maintainers
1
Versions
14
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 2.0.2 to 2.0.3

4

out/adapters/fs.d.ts
/// <reference types="node" />
import * as fs from 'fs';
export interface FileSystemAdapter {
export declare type FileSystemAdapter = {
lstat: typeof fs.lstat;

@@ -8,5 +8,5 @@ stat: typeof fs.stat;

statSync: typeof fs.statSync;
}
};
export declare const FILE_SYSTEM_ADAPTER: FileSystemAdapter;
export declare function createFileSystemAdapter(fsMethods?: Partial<FileSystemAdapter>): FileSystemAdapter;
//# sourceMappingURL=fs.d.ts.map

@@ -11,7 +11,7 @@ "use strict";

function createFileSystemAdapter(fsMethods) {
if (!fsMethods) {
if (fsMethods === undefined) {
return exports.FILE_SYSTEM_ADAPTER;
}
return Object.assign({}, exports.FILE_SYSTEM_ADAPTER, fsMethods);
return Object.assign(Object.assign({}, exports.FILE_SYSTEM_ADAPTER), fsMethods);
}
exports.createFileSystemAdapter = createFileSystemAdapter;
import { FileSystemAdapter } from './adapters/fs';
import * as async from './providers/async';
import Settings, { Options } from './settings';
import { Stats } from './types/index';
import { Stats } from './types';
declare type AsyncCallback = async.AsyncCallback;

@@ -6,0 +6,0 @@ declare function stat(path: string, callback: AsyncCallback): void;

import Settings from '../settings';
import { ErrnoException, Stats } from '../types/index';
import { ErrnoException, Stats } from '../types';
export declare type AsyncCallback = (err: ErrnoException, stats: Stats) => void;
export declare function read(path: string, settings: Settings, callback: AsyncCallback): void;
//# sourceMappingURL=async.d.ts.map

@@ -5,3 +5,3 @@ "use strict";

settings.fs.lstat(path, (lstatError, lstat) => {
if (lstatError) {
if (lstatError !== null) {
return callFailureCallback(callback, lstatError);

@@ -13,3 +13,3 @@ }

settings.fs.stat(path, (statError, stat) => {
if (statError) {
if (statError !== null) {
if (settings.throwErrorOnBrokenSymbolicLink) {

@@ -16,0 +16,0 @@ return callFailureCallback(callback, statError);

import Settings from '../settings';
import { Stats } from '../types/index';
import { Stats } from '../types';
export declare function read(path: string, settings: Settings): Stats;
//# sourceMappingURL=sync.d.ts.map
import * as fs from './adapters/fs';
export interface Options {
export declare type Options = {
followSymbolicLink?: boolean;

@@ -7,3 +7,3 @@ fs?: Partial<fs.FileSystemAdapter>;

throwErrorOnBrokenSymbolicLink?: boolean;
}
};
export default class Settings {

@@ -10,0 +10,0 @@ private readonly _options;

{
"name": "@nodelib/fs.stat",
"version": "2.0.2",
"version": "2.0.3",
"description": "Get the status of a file with some features",

@@ -21,3 +21,3 @@ "license": "MIT",

"clean": "rimraf {tsconfig.tsbuildinfo,out}",
"lint": "tslint \"src/**/*.ts\" -p . -t stylish",
"lint": "eslint \"src/**/*.ts\" --cache",
"compile": "tsc -b .",

@@ -29,3 +29,3 @@ "compile:watch": "tsc -p . --watch --sourceMap",

},
"gitHead": "b56e041e80bc6ae6c5fa31c327d5174ed1b8957a"
"gitHead": "3b1ef7554ad7c061b3580858101d483fba847abf"
}
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc