Big update!Introducing GitHub Bot Commands. Learn more
Socket
Log inDemoInstall

path-type

Package Overview
Dependencies
0
Maintainers
1
Versions
6
Issues
File Explorer

Advanced tools

path-type

Check if a path is a file, directory, or symlink

    5.0.0latest
    Github

Version published
Maintainers
1
Weekly downloads
50,698,664
increased by1.19%

Weekly downloads

Readme

Source

path-type

Check if a path is a file, directory, or symlink

Install

$ npm install path-type

Usage

import {isFile} from 'path-type'; console.log(await isFile('package.json')); //=> true

API

isFile(path)

Check whether the passed path is a file.

Returns a Promise<boolean>.

path

Type: string

The path to check.

isDirectory(path)

Check whether the passed path is a directory.

Returns a Promise<boolean>.

isSymlink(path)

Check whether the passed path is a symlink.

Returns a Promise<boolean>.

isFileSync(path)

Synchronously check whether the passed path is a file.

Returns a boolean.

isDirectorySync(path)

Synchronously check whether the passed path is a directory.

Returns a boolean.

isSymlinkSync(path)

Synchronously check whether the passed path is a symlink.

Returns a boolean.


Get professional support for this package with a Tidelift subscription
Tidelift helps make open source sustainable for maintainers while giving companies
assurances about security, maintenance, and licensing for their dependencies.

Keywords

FAQs

What is path-type?

Check if a path is a file, directory, or symlink

Is path-type popular?

The npm package path-type receives a total of 41,258,967 weekly downloads. As such, path-type popularity was classified as popular.

Is path-type well maintained?

We found that path-type demonstrated a not healthy version release cadence and project activity because the last version was released a year ago.It has 1 open source maintainer collaborating on the project.

Last updated on 27 Jan 2021

Did you know?

Socket installs a Github app to automatically flag issues on every pull request and report the health of your dependencies. Find out what is inside your node modules and prevent malicious activity before you update the dependencies.

Install Socket
Socket[email protected]

Product

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc