0.2.2 • Published 2 years ago

win-attributes v0.2.2

Weekly downloads
-
License
MIT
Repository
github
Last release
2 years ago

win-attributes

integration

Lightweight dependency-free Node.js package to get and set filesystem attributes in Microsoft Windows.

Installation

npm install win-attributes
# or
yarn add win-attributes

Usage

import { getAttributes, FileAttribute, setAttributes, SetAttributes  } from 'win-attributes';

(async () => {
  // retrieve attributes
  const path = '/path/to/directory';
  const attributes = await getAttributes(path);
  if (attributes.hidden) {
    console.log(`${path} is hidden`);
  }

  // set attributes
  const settings: SetAttributes = {
    [FileAttribute.Hidden]: false,
    [FileAttribute.Readonly]: false,
  };
  await setAttributes(path, settings);
})();

Development

# install dependencies
npm install

# lint
npm run lint

# run example
npm run example

# run tests
npm run test

# build
npm run build
0.2.2

2 years ago

0.2.1

2 years ago

0.2.0

2 years ago

0.1.14

2 years ago

0.1.13

2 years ago

0.1.12

2 years ago

0.1.11

2 years ago