{"_id":"@amilajack/diskusage","_rev":"2-65f302bc0942263859eb6ac09526d659","name":"@amilajack/diskusage","dist-tags":{"latest":"0.0.1"},"versions":{"0.0.0":{"name":"@amilajack/diskusage","version":"0.0.0","description":"Get total diskspace and free diskspace using bindings around platform specific calls.","main":"index.js","typings":"index.d.ts","gypfile":true,"dependencies":{"nan":"^2.5.0"},"repository":{"type":"git","url":"git+https://github.com/jduncanator/node-diskusage.git"},"keywords":["disk","usage","df","hdd","ssd","diskusage","df","free","space"],"author":{"name":"jduncanator"},"license":"MIT","bugs":{"url":"https://github.com/jduncanator/node-diskusage/issues"},"homepage":"https://github.com/jduncanator/node-diskusage","scripts":{"install":"node-gyp rebuild"},"gitHead":"88cea8d677b668ffe5bf764f52b1930d712c7b50","_id":"@amilajack/diskusage@0.0.0","_npmVersion":"6.4.1","_nodeVersion":"8.12.0","_npmUser":{"name":"amilajack","email":"amilajack@gmail.com"},"dist":{"integrity":"sha512-woqix7786HvxTXnEKAz6tP5L3AK0G11GFxJ9HiPCkjtcj+//qb76ZP0SiL5MmO99jjE7JZ/VANTbbzai3b7HhA==","shasum":"7ab992ddd1eba9e81873296163a310cfd62a6696","tarball":"https://registry.npmjs.org/@amilajack/diskusage/-/diskusage-0.0.0.tgz","fileCount":11,"unpackedSize":8820,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbqqXoCRA9TVsSAnZWagAAjZAQAIbL1wc+4a1sa7HdkJva\nxoq+UdLinTP5K2yJdW4Z77vD+Prp7lD9Mz1XEgshGKW7zYGYCsUuzYEZinA4\n+a5AmU5rLtd/l1x1rxujDXSX4Oj6kRgC2rQ8YkOqgI+gyIV3nhcs+/FS6CRn\noh7O7llLY1jxAuZQ4CT49nVopXbfjDnDwpUdP8fA2dzKgAP88HI6Cd740WJN\nerEo4igP6ACOqwbUru0iENqlT/6AWpnNeXBhbNW7r8Ieo5LiQ3K6L/FrLPqf\nDPPkmPjPlDxzbMJBBuEzUm7N1h236Lhvj3L6kCPEhIcGFj7/GfydS7sfRqLk\nsOkK6HX3npcy4D6mAz9antb/kTqhLGaL5E1tw8EupQafD2iuLyzQ3ThrrdTw\npH1hBeSvw32/u19iItWkEt3YUHiSWvZV5K9oX1mXhasKa9+z9jJ0ucMDPK/j\nLTuoCF0CuYNubQ+V+Yh9DwIGkdhKaF8ce+WTxeZFWdKJSCUVYy15Y6hLLyNa\nXxwq7E0gmoByGiLrFtgIjwNKgVbXc/QXfQYOeSZvenUwy4oL3EwfQNsxaGu3\nUP3U7lA2Gft+4zYQeEzKpY1k8Nkyhnc/6fVvEzxY+7idYvjRAGHHGOvvl56X\nUhtZlC6gYnE+LvpuoePrVgjMpWuCeYgphaPR5ASxnRIA1Yip4OcxCXNlGBZQ\n1WIB\r\n=HYZC\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIGyejIL+uThWKD11v1VqiKYIg+j+/YiJZsZAyYRBUOmJAiEAvN9IRcz9nP/nXb91TooM1phrPep84XPM56XZXsCobaQ="}]},"maintainers":[{"name":"amilajack","email":"amilajack@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/diskusage_0.0.0_1537910248164_0.2622459916567479"},"_hasShrinkwrap":false},"0.0.1":{"name":"@amilajack/diskusage","version":"0.0.1","description":"Get total diskspace and free diskspace using bindings around platform specific calls.","main":"index.js","typings":"index.d.ts","gypfile":true,"dependencies":{"nan":"^2.5.0"},"repository":{"type":"git","url":"https://github.com/jduncanator/node-diskusage.git"},"keywords":["disk","usage","df","hdd","ssd","diskusage","df","free","space"],"author":{"name":"jduncanator"},"license":"MIT","bugs":{"url":"https://github.com/jduncanator/node-diskusage/issues"},"homepage":"https://github.com/jduncanator/node-diskusage","devDependencies":{"@babel/core":"^7.1.0","@babel/preset-env":"^7.1.0","babel-core":"^7.0.0-0","babel-jest":"^23.6.0","eslint":"^5.6.0","eslint-config-bliss":"^2.3.0","jest":"^23.6.0"},"scripts":{"test":"jest .","install":"node-gyp rebuild"},"jest":{"testEnvironment":"node"},"licenseText":"The MIT License (MIT)\n\nCopyright (c) 2016 - present\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n","_id":"@amilajack/diskusage@0.0.1","dist":{"shasum":"8ad666bf1611e30902428dcd79c82287e5d0d462","integrity":"sha512-IBZIfxrqqMfbPbydTyB3RnAXxXEBkdE10Ub6mhJd7S2yz6yFsOD7qFjywuh51tPVCpJZoWxGPNmKBQC3bLrXsw==","tarball":"https://registry.npmjs.org/@amilajack/diskusage/-/diskusage-0.0.1.tgz","fileCount":25,"unpackedSize":54407,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbq8fKCRA9TVsSAnZWagAAz9cP/jVDUj2UHzHfEBiwxTc+\nKN7Pxnu6Zvn/idKOFkhcx+N7DSrAyS5l99pjhTBiCXYkKO5YRxe69wGyhVqQ\nkyde6hpLxQBvDLY4w8NEY7r06KwCfpz4Lxi7RJk0snGaculI8bPCRP0SSY9y\n+Geey1+7wDhbDFtR2pvVsSDbbwkuavehIamISFsKTLIUazOB72b3bKWhdspy\n+0I3S2ygOn+6Q4bsyBpHuEhAnOPZZgssWq047vpkDFUEMCCRcTfvk1/cTytf\ntBHvrlgqOLl96EurJJH8AJLZPbFl4KHUGBvqHysY5ibQSUkLJ7Y3nbmTpbxe\nKbLi3bHDj8Rhwuu0qudnMvCqowDmhDTXLaaepWm8TncW0lEFsYcKr3mlFUi+\nP3eC+mjN0nJkrcHVYm7yetkcKkvf/+J9DMtsV3Do2UZuB7Yu/JJ5zgGbvjNr\nJEuzZ1nSym8MxR1i/v90EHCZLQR+Yz/NbIoXrn0kPs3Ouqa56zplvRKqKUa8\nBfghuKLaqQ1S+aWaxUWtNQxYt1PmjEjvlLS6LQdVmdJFHGq2bqao6Hw03yoo\nljspQsSe5qxZ7ZVFnmjNQb35Cu4+hTWjayGXMrlYkFVJaH55wUG5JcHPDaRu\nUQuzGX0sbfkBySG5gBGP8ratr030bEzSwp8XfWUie8jCXjZHg8SC3dpoOXaT\nbh5o\r\n=oQFo\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIGNESv0kV/bqMrnFljvoPSIW1THxHtv61HlR7pUT1XZ4AiAbPNFCLW2PPO1b2d9OutXJjvh/Bpo3SMIsQkQmm42hIQ=="}]},"maintainers":[{"name":"amilajack","email":"amilajack@gmail.com"}],"_npmUser":{"name":"amilajack","email":"amilajack@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/diskusage_0.0.1_1537984457795_0.11331223453440886"},"_hasShrinkwrap":false}},"time":{"created":"2018-09-25T21:17:28.003Z","0.0.0":"2018-09-25T21:17:28.307Z","modified":"2022-04-04T13:48:43.291Z","0.0.1":"2018-09-26T17:54:17.978Z"},"maintainers":[{"name":"amilajack","email":"amilajack@gmail.com"}],"description":"Get total diskspace and free diskspace using bindings around platform specific calls.","homepage":"https://github.com/jduncanator/node-diskusage","keywords":["disk","usage","df","hdd","ssd","diskusage","df","free","space"],"repository":{"type":"git","url":"https://github.com/jduncanator/node-diskusage.git"},"author":{"name":"jduncanator"},"bugs":{"url":"https://github.com/jduncanator/node-diskusage/issues"},"license":"MIT","readme":"node-diskusage\n==============\n[![Build Status](https://travis-ci.org/amilajack/node-diskusage.svg?branch=master)](https://travis-ci.org/amilajack/node-diskusage)\n[![Build status](https://ci.appveyor.com/api/projects/status/4ddhl0l7aif37xw9/branch/master?svg=true)](https://ci.appveyor.com/project/amilajack/node-diskusage/branch/master)\n\nThis module implements platform specific bindings to obtain disk usage information on Windows and POSIX platforms. Windows support is backed by [GetDiskFreeSpaceEx](http://msdn.microsoft.com/en-us/library/windows/desktop/aa364937/) and POSIX is implemented with [statvfs](http://www.freebsd.org/cgi/man.cgi?query=statvfs).\n\n## Installation\n```bash\n$ npm install @amilajack/diskusage\n```\n\n## Usage\n\nThe module exposes two functions. `check` takes a path/mount point as the first argument and a callback as the second. The callback takes two arguments `err` and `info`. `err` will be an `Error` if something went wrong. `info` contains three members: `available`, `free` and `total` in bytes.\n\n- `available`: Disk space available to the current user (i.e. Linux reserves 5% for root)\n- `free`: Disk space physically free\n- `total`: Total disk space (free + used)\n\n`checkSync` only takes the path argument. It returns the same `info` on success, throws an `Error` on failure.\n\n## Examples\n```js\nimport disk from '@amilajck/diskusage';\nimport os from 'os';\n\nconst path = os.platform() === 'win32' ? 'c:' : '/';\nconst info = disk.checkSync(path);\nconsole.log(info.available);\nconsole.log(info.free);\nconsole.log(info.total);\n```\n","readmeFilename":"README.md"}