1.0.0 • Published 7 years ago

drive-by-path v1.0.0

Weekly downloads
3
License
MIT
Repository
github
Last release
7 years ago

drive-by-path

Status Build status

Returns the drive to which a path belongs

Install

Install it via npm.

npm install drive-by-path

Usage

const driveByPath = require('drive-by-path')

driveByPath('/zkochan/foo')
  .then(drive => console.log(drive))
//> {
//    matchedMountpointPath: '/'
//    device: '/dev/disk0',
//    displayName: '/dev/disk0',
//    ...
//  }

API

driveByPath(path): Promise<DriveInfo>

Returns info abouth the drive under which the path is located. Also returns what mountpoint was matched via matchedMountpointPath: one drive can have multiple mountpoints.

Arguments:

  • path - string - the filepath for which the drive is searched

License

MIT

1.0.0

7 years ago

0.1.2

7 years ago

0.1.1

7 years ago

0.1.0

7 years ago

0.0.3

7 years ago

0.0.2

7 years ago

0.0.1

7 years ago

0.0.0

7 years ago