Requirements: Get disk usage, you can intuitively see the hard disk usage in the background interface, no need to log in to the server to view, write your own code,Not online copy-paste。
The renderings are as follows:
{ "success": false, "code": 200, "message": "itsvse.com", "data": [{ "name": "C:\\", "totalSize": 161236381696, "totalSizeString": "150.16 GB", "totalUsedSpace": 86086381568, "totalUsedSpaceString": "80.17 GB", "totalFreeSpace": 75150000128, "totalFreeSpaceString": "69.99 GB", "percentage": "53%" }, { "name": "D:\\", "totalSize": 785173704704, "totalSizeString": "731.25 GB", "totalUsedSpace": 209646657536, "totalUsedSpaceString": "195.25 GB", "totalFreeSpace": 575527047168, "totalFreeSpaceString": "536 GB", "percentage": "27%" }, { "name": "H:\\", "totalSize": 104853504, "totalSizeString": "100 MB", "totalUsedSpace": 34779136, "totalUsedSpaceString": "33.17 MB", "totalFreeSpace": 70074368, "totalFreeSpaceString": "66.83 MB", "percentage": "33%" }, { "name": "V:\\", "totalSize": 53686038528, "totalSizeString": "50 GB", "totalUsedSpace": 7382994944, "totalUsedSpaceString": "6.88 GB", "totalFreeSpace": 46303043584, "totalFreeSpaceString": "43.12 GB", "percentage": "14%" }]
} The code is as follows:
|