int0h / npm-hddspace Goto Github PK
View Code? Open in Web Editor NEWThis module provides getting information about free space and size of hdds
This module provides getting information about free space and size of hdds
TypeError: func is not a function
at getCrossPlatformInfo (xxx/node_modules/hdd-space/hddSpace.js:113:2)
at settings.js:77:44
at Promise.F (xxx/node_modules/babel-runtime/node_modules/core-js/library/modules/$.export.js:30:36)
at _callee3$ (settings.js:77:27)
at tryCatch (xxx/node_modules/babel-runtime/regenerator/runtime.js:72:40)
at GeneratorFunctionPrototype.invoke [as _invoke] (xxx/node_modules/babel-runtime/regenerator/runtime.js:334:22)
at GeneratorFunctionPrototype.prototype.(anonymous function) [as next] (xxx/node_modules/babel-runtime/regenerator/runtime.js:105:21)
at step (xxx/node_modules/babel-runtime/helpers/asyncToGenerator.js:17:30)
at xxx/node_modules/babel-runtime/helpers/asyncToGenerator.js:28:20
I'm trying to pass the options object into hddSpace as such:
hddSpace({format: 'gb'}, (info: DriveInfo) => {
resolve(info);
});
In your modules index.ts the following is thrown:
TypeError: Cannot read property 'toLowerCase' of undefined
In the documentation of the package it says:
It's possible to pass option object as the first argument. Now the only supported opion is format which can be one of the following (case insesetive): ...
What Am I doing wrong?
Any chance this awesome package will support disk labels for win32
platform?
It is a bit confusing to track what disk handles which data by C:
D:
E:
Thanks for your amazing work!
Is it possible to detect external media connected via USB and process such disks or flash drives separately?
Like so:
{ parts:
[ { free: 496592740352,
size: 539028877312,
place: 'X:',
letter: 'X:',
usb: true,
label: 'My Flash' } ]
Thanks!
On windows it works fine, but on my ubuntu 16.04.2 I have this output:
node hdd.js
{ parts:
[ { free: 'NaN PB', size: 'NaN PB', place: 'v', mountOn: 'v' },
{ free: 'NaN PB', size: 'NaN PB', place: 'n', mountOn: 'n' },
{ free: 'NaN PB', size: 'NaN PB', place: '/', mountOn: '/' },
{ free: 'NaN PB', size: 'NaN PB', place: 'm', mountOn: 'm' },
{ free: 'NaN PB', size: 'NaN PB', place: 'k', mountOn: 'k' },
{ free: 'NaN PB', size: 'NaN PB', place: 'p', mountOn: 'p' },
{ free: 'NaN PB', size: 'NaN PB', place: 's', mountOn: 's' },
{ free: 'NaN PB', size: 'NaN PB', place: 'o', mountOn: 'o' },
{ free: 'NaN PB', size: 'NaN PB', place: 's', mountOn: 's' },
{ free: 'NaN PB', size: 'NaN PB', place: '0', mountOn: '0' },
{ free: 'NaN PB', size: 'NaN PB', place: '1', mountOn: '1' } ],
total: { free: 'NaN PB', size: 'NaN PB' } }
here is hdd.js:
var hddSpace = require('hdd-space');
hddSpace({ format: 'auto' }, function (info) {
console.log(info);
});
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.