@simbo/accessible
v1.0.1
Published
A set of helper functions to check if files or directories are existing, readable, writable, or executable.
Downloads
68
Maintainers
Readme
Accessible
A lightweight utility library that provides reliable checks for file system accessibility.
It helps you determine whether files or directories are existing, readable, writable, or executable — with a simple, async-first API.
Features
Check if a file or directory exists
Verify if a path is readable, writable, or executable
Minimal and dependency-free
Fully typed TypeScript API
Installation
Install @simbo/accessible from the npm registry:
npm i [-D] @simbo/accessibleUsage
For a complete API reference, see the documentation.
Use the provided functions in your code:
import { isReadableFile, isWritableDirectory } from '@simbo/accessible';
if (await isReadableFile('path/to/file')) {
console.log('File is readable');
}
if (await isWritableDirectory('path/to/directory')) {
console.log('Directory is writable');
}