path-type
- Version 6.0.0
- Published
- 5.33 kB
- No dependencies
- MIT license
Install
npm i path-typeyarn add path-typepnpm add path-typeOverview
Check if a path is a file, directory, or symlink
Index
Variables
variable isDirectory
const isDirectory: PathTypeFunction;Check whether the passed
pathis a directory.Parameter path
The path to check.
Returns
Whether the
pathis a directory.
variable isDirectorySync
const isDirectorySync: PathTypeSyncFunction;Synchronously check whether the passed
pathis a directory.Parameter path
The path to check.
Returns
Whether the
pathis a directory.
variable isFile
const isFile: PathTypeFunction;Check whether the passed
pathis a file.Parameter path
The path to check.
Returns
Whether the
pathis a file.
variable isFileSync
const isFileSync: PathTypeSyncFunction;Synchronously check whether the passed
pathis a file.Parameter path
The path to check.
Returns
Whether the
pathis a file.
variable isSymlink
const isSymlink: PathTypeFunction;Check whether the passed
pathis a symlink.Parameter path
The path to check.
Returns
Whether the
pathis a symlink.
variable isSymlinkSync
const isSymlinkSync: PathTypeSyncFunction;Synchronously check whether the passed
pathis a symlink.Parameter path
The path to check.
Returns
Whether the
pathis 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[](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.
