Skip to content

Get all directories contained in a string file path

License

Notifications You must be signed in to change notification settings

jy95/path-directories

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

Get all directories contained in a string file path

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Sponsor this project

Packages

No packages published