can-write-to-dir
Returns true if the current process has permission to write to the specified directory
Last updated 5 years ago by zkochan .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install can-write-to-dir 
SYNC missed versions from official npm registry.

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

Current Tags

  • 1.1.1                                ...           latest (5 years ago)
  • 1.1.0                                ...           next (5 years ago)

4 Versions

  • 1.1.1                                ...           5 years ago
  • 1.1.0                                ...           5 years ago
  • 1.0.1                                ...           5 years ago
  • 1.0.0                                ...           6 years ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 1
Dependencies (1)
Dev Dependencies (3)

Copyright 2013 - present © cnpmjs.org | Home |