LarpixClient/node_modules/path-type
2026-05-03 17:09:55 +02:00
..
node_modules/pify Add capacitorjs runtime 2026-05-03 17:09:55 +02:00
index.js Add capacitorjs runtime 2026-05-03 17:09:55 +02:00
license Add capacitorjs runtime 2026-05-03 17:09:55 +02:00
package.json Add capacitorjs runtime 2026-05-03 17:09:55 +02:00
readme.md Add capacitorjs runtime 2026-05-03 17:09:55 +02:00

path-type Build Status

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

Install

$ npm install path-type

Usage

const pathType = require('path-type');

pathType.file('package.json').then(isFile => {
	console.log(isFile);
	//=> true
})

API

.file(path)

.dir(path)

Returns a Promise for a boolean of whether the path is the checked type.

.fileSync(path)

.dirSync(path)

.symlinkSync(path)

Returns a boolean of whether the path is the checked type.

License

MIT © Sindre Sorhus