package
Foolproof Windows® file attributes.
npm install winattrGitHub-flavored package documentation.
Across all versions.
Download trend unavailable.
Runtime metadata.
Tagged topics.
Foolproof Windows® file attributes.
Get and set the following on a file or directory:
archivehiddenreadonlysystemA native binding is used, offering great performance. As a contingency in case that fails, functionality will silently revert to a command line, though it is considerably slower.
[!IMPORTANT]
It may go without saying, but this library is not intended to run on anything other than Windows.
npm install winattrimport { getAttributes, getAttributesSync, setAttributes, setAttributesSync } from 'winattr';
await getAttributes('path/to/file.ext'); //-> {…}
getAttributesSync('path/to/file.ext'); //-> {…}
await setAttributes('path/to/folder/', { readonly: true });
setAttributesSync('path/to/folder/', { readonly: true });Estimated unpacked size across 3 packages.
559.3 kB
Includes dependencies.