Giter Club home page Giter Club logo

npm-hddspace's People

Contributors

int0h avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

raffis

npm-hddspace's Issues

Support macOS

  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

TypeError: Cannot read property 'toLowerCase' of undefined

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?

Support Disk Labels for Windows

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!

External media connected via USB

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!

Disk detection on linux

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);
});

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.