There is no build in way to get disk space information. There are a few npm modules available:
This is such a basic API that should be built-in.
libuv would need to add such support first, then node would add an API that uses that libuv API.
From what I can tell, the modules you linked to only provide a subset of what statvfs()
. libuv would also require a Windows implementation. It looks like Python rejected a Windows implementation a while back (not sure if that has since changed).
cc: @saghul
@miniak I use https://www.npmjs.com/package/storage-device-info, which only depends on NAN. Regardless though, it would be nice to have this built-in.
I'm not opposed to it, proven that there is a reasonable implementation for
all our supported platforms.
On Wed, Jan 11, 2017 at 10:11 PM, Colin Ihrig notifications@github.com
wrote:
From what I can tell, the modules you linked to only provide a subset of
what statvfs(). libuv would also require a Windows implementation. It
looks like Python rejected a Windows implementation a while back (not sure
if that has since changed).cc: @saghul https://github.com/saghul
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/nodejs/node/issues/10745#issuecomment-272071525, or mute
the thread
https://github.com/notifications/unsubscribe-auth/AATYGKUndJ91Q_f6zCFglPz2ht1KbyI3ks5rRafbgaJpZM4Lg_h1
.
--
/Saúl
bettercallsaghul.com
Given that this issue has been inactive for several months, is it sensible close this (or at least mark is at blocked) unless and until the necessary features are added to libuv?
I think this is still valid, regardless of people having have spent time on it.
https://github.com/jduncanator/node-diskusage now implements in C++, it also have a Windows implementation.
Put into https://github.com/nodejs/node/projects/13 backlog
So is this happening or not? I see it on the project dashboard but it's now closed?
@refack
Does integration of this package https://github.com/jduncanator/node-diskusage
as another deps
and expose an api statvfs
will be a good solution for this use case?
@sagitsofan should be opened in libuv/libuv as a feature request, if it can be implemented portably in libuv, then node could expose it.
@sam-github But if we can integrated directly inside node the node-diskusage
package we wont be dependent on libuv
@sagitsofan But we like to depend on uv! Its not a burden, its our compat layer.
If anyone really wants to see this in Node, I'd recommend opening an issue on the libuv issue tracker. The feature request should describe what the API would look like, taking a Windows implementation into consideration. This python issue is old, but might still be relevant.
So after this feature has been added into libuv core, when will it be available inside node js project?
I would like to create the wrapper in node.
I'm planning a libuv release for this week. I'll also have to expose the API in Node. It should be available in the next one or two Node 12.x releases.
I would be happy to expose the API in node after the libuv release.
@sagitsofan were you volunteering to write the fs
code to expose uv_fs_statfs()
? If you were volunteering, the libuv update has landed in Node.
Sure, i am on it.
please reopen this issue, is not resolved yet.
Most helpful comment
I would be happy to expose the API in node after the libuv release.