{"id":19982144,"url":"https://github.com/code2life/node-disk","last_synced_at":"2026-06-05T01:31:51.512Z","repository":{"id":65460376,"uuid":"130009098","full_name":"Code2Life/node-disk","owner":"Code2Life","description":"Get physical disk information in Node.js","archived":false,"fork":false,"pushed_at":"2018-10-13T14:48:45.000Z","size":14,"stargazers_count":1,"open_issues_count":1,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-01-12T10:47:41.732Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Code2Life.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-04-18T05:35:48.000Z","updated_at":"2018-10-13T14:48:47.000Z","dependencies_parsed_at":"2023-01-24T14:45:22.370Z","dependency_job_id":null,"html_url":"https://github.com/Code2Life/node-disk","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Code2Life%2Fnode-disk","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Code2Life%2Fnode-disk/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Code2Life%2Fnode-disk/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Code2Life%2Fnode-disk/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Code2Life","download_url":"https://codeload.github.com/Code2Life/node-disk/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241418363,"owners_count":19959736,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-13T04:09:21.812Z","updated_at":"2025-03-01T20:11:28.484Z","avatar_url":"https://github.com/Code2Life.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Node-disk\nNode-disk is a C++ addon node.js module for get physical disk information. Now it support windows platform, will support linux \u0026 macOS soon.\n\n# Usage\nnpm install node-disk --save\n\n```js\nconst disk = require('node-disk');  \n\nconst info = disk.getDisk((err, data) =\u003e {\n  //data is disk information\n});\n\n//or invoke like this\ndisk.getDisk().then((data) =\u003e {\n  //support promise or async/await\n}).catch((err) =\u003e {\n  //error info\n});\n\n//or query by volumes\ndisk.getDisk('C:', (err, data) =\u003e { });\n//or like this, it's ok to pass a single letter, since it just compare first letter in windows\n(async () =\u003e {\n  let info = await disk.getDisk('D');\n})()\n\n```\n# Data Format\nDisk information includes total and free size of disk currently. Plan to implement other info in future.\n```js\n{\n  total: '1042.04 GB',\n  free: '781.00 GB',\n  volumes: [{\n      name: 'C:\\\\',\n      total: '78.74 GB',\n      free: '31.18 GB'\n    }\n  ]\n}\n```\n\n# Todo\n- Support linux and macOS\n- Get more info about hardware\n- Refector by using nan(Native Abstractions for Node.js)\n- Add docs and mocha test cases\n\n# Licence \u0026 copyright\nCopyright (c) 2018 Code2Life\nNode-disk is licensed under an MIT license. All rights not explicitly granted in the MIT license are reserved. See the included LICENSE file for more details.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcode2life%2Fnode-disk","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcode2life%2Fnode-disk","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcode2life%2Fnode-disk/lists"}