JSPM

can-write-to-dir

1.1.1
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 112754
  • Score
    100M100P100Q171006F
  • License MIT

Returns true if the current process has permission to write to the specified directory

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

npm version

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.

License

MIT © Zoltan Kochan