Package Exports
- ack-path
- ack-path/file
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (ack-path) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
ack-path
Operating system directory functionality
System Directory Functionality
var path = require('ack-path')
var Path = path(__dirname)
//write file promise
Path.join('file-name.js').writeFile(string).then().catch()
//created directory if not existant. Does not take into condsideration if path is actually a file (file path will be created as a folder path)
Path.param().then()
//created directory if not existant. Takes condsideration if path is actually a file and only creates folder path
Path.paramDir().then()
//string manipulation
Path.join('a','b','c.js').path// = __dirname/a/b/c.js
//path delete promise
Path.delete().then()
var PathTest = path('/test/file.js')
//string manipulation
PathTest.removeExt().path == /test/file
//string manipulation
PathTest.removeExt().path == /test/file
//string manipulation
PathTest.removeFile().path == /test/
//string manipulation
PathTest.removeFile().path == /test/NONASYNC Examples
var PathSync = path(__dirname).sync()
PathSync.dirExists()//considers if path is actually a file
PathSync.exists()
PathSync.delete()
PathSync.copyTo()System File Functionality
var path = require('ack-path')
var Path = path(__dirname).file('file-name.js')
Path.delete().then()
Path.getMimeType()//Ex: application/javascript
Path.stat().then(stats=>stats.size)
Path.write(string).then()
Path.append(string).then()