1
0
mirror of https://github.com/S2-/gitlit synced 2025-08-03 12:50:04 +02:00
Files
gitlit/node_modules/path-type
2018-12-11 18:39:24 +01:00
..
2018-12-11 18:39:24 +01:00
2018-06-03 13:57:23 +02:00
2018-06-03 13:57:23 +02:00
2018-12-11 18:39:24 +01:00
2018-06-03 13:57:23 +02: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)

.symlink(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