{"versions":{"3.0.0":{"name":"@akryum/winattr","description":"Foolproof Windows® file attributes.","version":"3.0.0","license":"MIT","author":{"name":"Steven Vachon","email":"contact@svachon.com","url":"https://www.svachon.com/"},"contributors":[{"name":"Guillaume Chau","email":"guillaume.b.chau@gmail.com"}],"main":"lib","repository":{"type":"git","url":"git+https://github.com/Akryum/winattr.git"},"scripts":{"prepublishOnly":"yarn test","test":"yarn test:eslint && yarn test:unit","test:unit":"mocha test/ --bail --reporter spec --check-leaks","test:eslint":"eslint lib --ext .js"},"dependencies":{"fswin":"^2.17.1227"},"devDependencies":{"chai":"^4.0.0","eslint":"^4.10.0","eslint-config-standard":"^11.0.0","eslint-plugin-import":"^2.8.0","eslint-plugin-node":"^6.0.0","eslint-plugin-promise":"^3.4.0","eslint-plugin-standard":"^3.0.1","mocha":"^3.4.2"},"engines":{"node":">= 8"},"files":["lib","license"],"keywords":["attributes","file","fs","fs-stat","native","ntfs","windows"],"publishConfig":{"access":"public"},"gitHead":"9654ca469456d22ee7a23e37e6beeacd412f0da9","bugs":{"url":"https://github.com/Akryum/winattr/issues"},"homepage":"https://github.com/Akryum/winattr#readme","_id":"@akryum/winattr@3.0.0","_npmVersion":"6.1.0","_nodeVersion":"10.4.1","_npmUser":{"name":"anonymous","email":"alphadelta.fg@gmail.com"},"dist":{"integrity":"sha512-t4WmWoGV9gyzypwG3y3JlcK2t8fKLtvzBA7xEoFTj9SMPvOuLsf13uh4ikK0RRaaa9RPPWLgFUdOyIRaQvCpwQ==","shasum":"c345d49f8415583897e345729c12b3503927dd11","tarball":"http://123.232.10.234:8212/nexus/content/groups/npm-public/@akryum/winattr/-/winattr-3.0.0.tgz","fileCount":11,"unpackedSize":15307,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbKCo/CRA9TVsSAnZWagAAxYcP/3ZWvWEFkaIHfwN/yQP3\n/lyU7peZkCPcKyxqbOXhTDUvHbUNeWXwhgdre5ixgKGm7VDL/b6gyKXtO3lC\n2LTTJpmM3mNk/+7D6H1wcvC+ew3Awyz2HHzoX2Jx0IZ9Jyc5BGczj6JzXlug\nA51vIHgW+XGcvGzeNHfBob9PyxOHjhCkzwOCCOStdqPPBkW+BRfvFtf+lhi9\nb/4d1sAQBJs9jvXi7VtyWcJjbuWowyQTVz0D5oFFOjtqXlZUIvxqbnkfujk7\nDHb1Su2MBQnio+zyc6ossjxA76YrSy6yo0+YWwmocdXkNZBQX9yHesNdaeum\ngW8v4PrVApR9MtXtUQVtzI1FmQ+yH4fUC5KPHq8C8rYppx8Up2Xrgsj/Hwca\nk+L2X19N3cKGSqSFWO8mTt3LB6YPAVXc6HtRKfWPRjmmFg5W+FwT5AjIhIlG\nJw5tVBTdzanDwDR1JNFTv877fHhQKqbahzcQ8RmOnxGUufOJRHZlzq8EqpOp\nazh6INY5BsZEME/LJsIhOUC42W8KGAbBX04xWPmEYe39T/V33DHjtnnDEiWd\noS+qHqqPedJ1htzD0rb5cLS8nKjkIoHnemZRt3BXkI4Jj2+o0wwU1PNzp98u\neUrUkU/Ze/us8gni8RdNbn//iNfyxYHkgf6evbbFz4HGJApI11Q3E/vuy2T1\n6vTv\r\n=JmMt\r\n-----END PGP SIGNATURE-----\r\n"},"maintainers":[{"name":"anonymous","email":"alphadelta.fg@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/winattr_3.0.0_1529358910917_0.025370659289885245"}}},"dist-tags":{"latest":"3.0.0"},"name":"@akryum/winattr","time":{"created":"2022-01-26T23:14:01.559Z","3.0.0":"2018-06-18T21:55:11.022Z","modified":"2022-01-26T23:14:01.559Z"},"readme":"# winattr [![NPM Version][npm-image]][npm-url] [![Linux Build][travis-image]][travis-url] [![Windows Build][appveyor-image]][appveyor-url] [![Dependency Status][david-image]][david-url]\r\n\r\n> Foolproof Windows® file attributes for Node.js\r\n\r\nGet and set:\r\n* `archive`\r\n* `hidden`\r\n* `readonly`\r\n* `system`\r\n\r\n… on files and/or directories.\r\n\r\nA 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.\r\n\r\n\r\n## Installation\r\n\r\nIt may go without saying, but this library is not intended to run on anything other than Windows.\r\n\r\n[Node.js](http://nodejs.org/) `>= 4` is required. To install, type this at the command line:\r\n\r\n```\r\nnpm install @akryum/winattr\r\n```\r\n\r\nOr:\r\n\r\n```\r\nyarn add @akryum/winattr\r\n```\r\n\r\n## Usage\r\n\r\n### `get(path, callback)`\r\n`path` - Path to file or directory\r\n`callback(err,attrs)` - A callback which is called upon completion\r\n```js\r\nwinattr.get(\"path/to/file.ext\", function(err, attrs) {\r\n\tif (err == null) console.log(attrs);\r\n});\r\n```\r\n\r\nIf you omit the callback, a Promise will be return instead.\r\n\r\n### `getSync(path)`\r\n`path` - Path to file or directory\r\n\r\nReturns an `Object` or throws an error if the file or dir cannot be found/accessed.\r\n```js\r\nvar attrs = winattr.getSync(\"path/to/file.ext\");\r\n\r\nconsole.log(attrs);\r\n```\r\n\r\n### `set(path, attrs, callback)`\r\n`path` - Path to file or directory\r\n`attrs` - An object containing attributes to change\r\n`callback(err)` - A callback which is called upon completion\r\n```js\r\nwinattr.set(\"path/to/folder/\", {readonly:true}, function(err) {\r\n\tif (err == null) console.log(\"success\");\r\n});\r\n```\r\n\r\nIf you omit the callback, a Promise will be return instead.\r\n\r\n### `setSync(path, attrs)`\r\n`path` - Path to file or directory\r\n`attrs` - An object containing attributes to change\r\n\r\nThrows an error if the file or dir cannot be found/accessed.\r\n```js\r\nwinattr.setSync(\"path/to/folder/\", {readonly:true});\r\n```\r\n\r\n[npm-image]: https://img.shields.io/npm/v/winattr.svg\r\n[npm-url]: https://npmjs.com/package/winattr\r\n[travis-image]: https://img.shields.io/travis/stevenvachon/winattr.svg?label=linux\r\n[travis-url]: https://travis-ci.org/stevenvachon/winattr\r\n[appveyor-image]: https://img.shields.io/appveyor/ci/stevenvachon/winattr.svg?label=windows\r\n[appveyor-url]: https://ci.appveyor.com/project/stevenvachon/winattr\r\n[david-image]: https://img.shields.io/david/stevenvachon/winattr.svg\r\n[david-url]: https://david-dm.org/stevenvachon/winattr","users":{}}