puter
puter copied to clipboard
HostDiskUsageService
Right now we're using the diskusage
package, added in this PR, to measure the host OS disk capacity (to display in Puter's storage usage meter). This package uses node-gyp
and depends on Python, so it limits portability. We could write a our own in node from scratch with implementations for POSIX, OSX, and Windows to start off with.
Checking disk capacity should happen in two phases:
- What mountpoint/drive is the current process working directory under?
- What is the capacity of that mountpoint/drive?
Someone who only uses one of the three operating systems I listed could start it off and leave blanks for the next person to fill; let's just make sure the "unsupported operating system" case is something pragmatic, like "log a notice that it's not supported, and set apparent disk capacity to an arbitrary large number"