path-type
- Version 6.0.0
- Published
- 5.33 kB
- No dependencies
- MIT license
Install
npm i path-type
yarn add path-type
pnpm add path-type
Overview
Check if a path is a file, directory, or symlink
Index
Variables
variable isDirectory
const isDirectory: PathTypeFunction;
Check whether the passed
path
is a directory.Parameter path
The path to check.
Returns
Whether the
path
is a directory.
variable isDirectorySync
const isDirectorySync: PathTypeSyncFunction;
Synchronously check whether the passed
path
is a directory.Parameter path
The path to check.
Returns
Whether the
path
is a directory.
variable isFile
const isFile: PathTypeFunction;
Check whether the passed
path
is a file.Parameter path
The path to check.
Returns
Whether the
path
is a file.
variable isFileSync
const isFileSync: PathTypeSyncFunction;
Synchronously check whether the passed
path
is a file.Parameter path
The path to check.
Returns
Whether the
path
is a file.
variable isSymlink
const isSymlink: PathTypeFunction;
Check whether the passed
path
is a symlink.Parameter path
The path to check.
Returns
Whether the
path
is a symlink.
variable isSymlinkSync
const isSymlinkSync: PathTypeSyncFunction;
Synchronously check whether the passed
path
is a symlink.Parameter path
The path to check.
Returns
Whether the
path
is a directory.
Type Aliases
type PathTypeFunction
type PathTypeFunction = (path: string) => Promise<boolean>;
type PathTypeSyncFunction
type PathTypeSyncFunction = (path: string) => boolean;
Package Files (1)
Dependencies (0)
No dependencies.
Dev Dependencies (4)
Peer Dependencies (0)
No peer dependencies.
Badge
To add a badge like this oneto your package's README, use the codes available below.
You may also use Shields.io to create a custom badge linking to https://www.jsdocs.io/package/path-type
.
- Markdown[![jsDocs.io](https://img.shields.io/badge/jsDocs.io-reference-blue)](https://www.jsdocs.io/package/path-type)
- HTML<a href="https://www.jsdocs.io/package/path-type"><img src="https://img.shields.io/badge/jsDocs.io-reference-blue" alt="jsDocs.io"></a>
- Updated .
Package analyzed in 3307 ms. - Missing or incorrect documentation? Open an issue for this package.