Package Exports
- can-write-to-dir
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 (can-write-to-dir) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
can-write-to-dir
Returns true if the current process has permission to write to the specified directory
Installation
<npm|yarn|pnpm> add can-write-to-dir
Usage
const canWriteToDir = require('can-write-to-dir')
canWriteToDir.sync('C:\\')
//> false
API
canWriteToDir.sync(dir): Boolean
Returns true
if fs.writeFileSync
is able to create a file.
canWriteToDir(dir): Promise<Boolean>
Returns true
if fs.writeFile
is able to create a file.