datalad-course/node_modules/path-type
2025-03-21 15:28:44 +01:00
..
index.js A new start for all of Adina's DataLad Course talks - properly annexed 2025-03-21 15:28:44 +01:00
license A new start for all of Adina's DataLad Course talks - properly annexed 2025-03-21 15:28:44 +01:00
package.json A new start for all of Adina's DataLad Course talks - properly annexed 2025-03-21 15:28:44 +01:00
readme.md A new start for all of Adina's DataLad Course talks - properly annexed 2025-03-21 15:28:44 +01:00

path-type Build Status

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

Install

$ npm install --save path-type

Usage

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

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

API

.file(path)

.dir(path)

Returns a promise that resolves to 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