path-type

WebJar for path-type

License

License

MIT
GroupId

GroupId

org.webjars.npm
ArtifactId

ArtifactId

path-type
Last Version

Last Version

4.0.0
Release Date

Release Date

Type

Type

jar
Description

Description

path-type
WebJar for path-type
Project URL

Project URL

http://webjars.org
Source Code Management

Source Code Management

https://github.com/sindresorhus/path-type

Download path-type

How to add to project

<!-- https://jarcasting.com/artifacts/org.webjars.npm/path-type/ -->
<dependency>
    <groupId>org.webjars.npm</groupId>
    <artifactId>path-type</artifactId>
    <version>4.0.0</version>
</dependency>
// https://jarcasting.com/artifacts/org.webjars.npm/path-type/
implementation 'org.webjars.npm:path-type:4.0.0'
// https://jarcasting.com/artifacts/org.webjars.npm/path-type/
implementation ("org.webjars.npm:path-type:4.0.0")
'org.webjars.npm:path-type:jar:4.0.0'
<dependency org="org.webjars.npm" name="path-type" rev="4.0.0">
  <artifact name="path-type" type="jar" />
</dependency>
@Grapes(
@Grab(group='org.webjars.npm', module='path-type', version='4.0.0')
)
libraryDependencies += "org.webjars.npm" % "path-type" % "4.0.0"
[org.webjars.npm/path-type "4.0.0"]

Dependencies

There are no dependencies for this project. It is a standalone project that does not depend on any other jars.

Project Modules

There are no modules declared in this project.

path-type

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

Install

$ npm install path-type

Usage

const {isFile} = require('path-type');

(async () => {
	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.

Versions

Version
4.0.0
3.0.0
2.0.0
1.1.0