Home
Docs
GitHub
Pricing
Blog
Log In

Run Sandworm Audit for your App

Get started
Hold on, we're currently generating a fresh version of this report
Generated on Mar 21, 2024 via pnpm

@nodelib/fs.stat 2.0.5

Get the status of a file with some features
Package summary
Share
0
issues
1
license
1
MIT
Package created
7 May 2018
Version published
4 Jun 2021
Maintainers
1
Total deps
1
Direct deps
0
License
MIT

Issues

0
This package has no issues

Licenses

MIT License

Permissive
OSI Approved
This is a human-readable summary of (and not a substitute for) the license. Disclaimer.
Can
commercial-use
modify
distribute
sublicense
private-use
Cannot
hold-liable
Must
include-copyright
include-license
1 Packages, Including:
@nodelib/fs.stat@2.0.5
Disclaimer

This deed highlights only some of the key features and terms of the actual license. It is not a license and has no legal value. You should carefully review all of the terms and conditions of the actual license before using the licensed material.

Sandworm is not a law firm and does not provide legal services. Distributing, displaying, or linking to this deed or the license that it summarizes does not create a lawyer-client or any other relationship.

Direct Dependencies

0
All Dependencies CSV
β“˜ This is a list of @nodelib/fs.stat 's direct dependencies. Data on all dependencies, including transitive ones, is available via CSV download.
NameVersionSizeLicenseTypeVulnerabilities

Visualizations

Frequently Asked Questions

What does @nodelib/fs.stat do?

The npm package @nodelib/fs.stat is a useful tool in JavaScript that aids in retrieving the status of a file. It comes with a host of enhanced features as it wraps around the standard fs.lstat and fs.stat methods. @nodelib/fs.stat usually follows symbolic links and can safely operate with broken symbolic links.

How do you use @nodelib/fs.stat?

Using @nodelib/fs.stat in your projects is as straightforward as installing the package using npm and then including it in your desired file. Let's elaborate this with some code:

First, install the package:

npm install @nodelib/fs.stat

Then, in your JavaScript or TypeScript file, you can import and use it like this:

import * as fsStat from '@nodelib/fs.stat';

fsStat.stat('path/to/your/file', (error, stats) => { 
    if (error) {
        console.error('An error occurred:', error);
    } else {
        console.log('File stats:', stats);
    }
});

Or you can use it synchronously, like this:

import * as fsStat from '@nodelib/fs.stat';

try {
    const stats = fsStat.statSync('path/to/your/file');
    console.log('File stats:', stats);
} catch (error) {
    console.error('An error occurred:', error);
}

Where are the @nodelib/fs.stat docs?

Comprehensive documentation, along with its API and usage guide, for @nodelib/fs.stat is available in the readme on the project's GitHub page (https://github.com/nodelib/nodelib). In the readme, you'll find detailed instructions on the various methods available as well as config settings for finer control. This provides you with the understanding needed to utilize this software package to its full potential.