path-directories

1.0.2 • Public • Published

path-directories

Get all directories contained in a string file path

Install

$ npm install --save path-directories

Usage

const dirnames = require('path-directories');
// Windows path - gives [ 'D:', 'DDL', 'ANIME', 'les chevaliers du zodiaques' ]
dirnames("D:\\DDL\\ANIME\\les chevaliers du zodiaques\\whateverFile.avi");
// POSIX path - gives [ 'D:', 'DDL', 'EBOOK' ]
dirnames("D:/DDL/EBOOK/whatEverFile.pub");

API

path-directories(filePath)

Returns all the directories in this string file path.

License

MIT

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 1.0.2
    178
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 1.0.2
    178
  • 1.0.1
    2
  • 1.0.0
    0

Package Sidebar

Install

npm i path-directories

Weekly Downloads

54

Version

1.0.2

License

MIT

Unpacked Size

5.98 kB

Total Files

7

Last publish

Collaborators

  • jy95