can-write-to-dir
TypeScript icon, indicating that this package has built-in type declarations

1.1.1 • Public • Published

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

/can-write-to-dir/

    Package Sidebar

    Install

    npm i can-write-to-dir

    Weekly Downloads

    92,201

    Version

    1.1.1

    License

    MIT

    Unpacked Size

    3.92 kB

    Total Files

    6

    Last publish

    Collaborators

    • zkochan