Node-fs-extra: Consider linking to a cross-platform API for checking devices and partitions

Created on 30 Oct 2017  Â·  13Comments  Â·  Source: jprichardson/node-fs-extra

I am currently building an utility to detect the filesystem alongside some other properties of the volumes and devices on the computer. The utility will support macOS, Windows and Linux.

On Linux I use the commands df -T, fdisk -l and lsblk to obtain my information, while on mac I use diskutil info -all and wmic logicaldisk get on Windows. I will provide as much of a unified interface as possible, returning an hash of all devices and volumes with properties id, node, whole, parent, name, size, description, physical block size, logical block size, read only, removable, filesystem type, mounted, mount point, blocks, space available, space used, total space.

Interested? :)

future

Most helpful comment

@philippefutureboy very cool. This should be a separate module for the time being. When I feel fs-extra has stability and can do things like chmodr and regex on files, we can revisit. But until then, I'd like to keep what you have as a separate module. We'd accept a PR though to the readme to inform people that this is a complementary module.

All 13 comments

Sounds like a great project, but this belongs in a separate module IMO. fs-extra uses only native fs methods; it never shells out. Perhaps we could link to your project from our readme, though.

All good, np :)
This is still under development, but you can find the repo here - https://github.com/qzdio/node-fsfilesystem
Out of curiosity, by native methods you mean from the node js fs package?

Out of curiosity, by native methods you mean from the node js fs package?

Yes

Gonna close this out for now; @philippefutureboy feel free to comment below or open a new issue when your module is "complete" (though good modules are never truly complete, I know). :smiley_cat:

Sounds good, I should be finished with the first version either today or tomorrow!

Could I ask you for a small favor? I am currently running my test using my own setups, but there is no guarantee that my setups cover all the use cases possible. Hence if you have computers under Linux, MacOS or (especially) Windows, it would be great if you could send me a .txt file of the output of the respective command for the OS:

  • Linux: df -T && echo "" && echo "**********" && echo "" && fdisk -l && echo "" && echo "**********" && echo "" && lsblk -o kname,fstype,mountpoint,label,ro,rm,model,type -P
  • MacOS: diskutil info -all
  • Windows: wmic logicaldisk get Caption,Description,DeviceID,FileSystem,FreeSpace,Name,Size,VolumeName

(Since I will commit these to git, you might want to remove any sensitive information first)

It would be a great help :)
Thanks! ✨

After an unexpectedly herculean effort (and some expected delay):

fs-filesystem

Haven't tested but looks OK overall. Reopening to discuss linking from the README. @jprichardson @manidlou What are your thoughts here?

Hey guys! Any update? :)

Cheers 🚀

@jprichardson @manidlou ping!?

@philippefutureboy very cool. This should be a separate module for the time being. When I feel fs-extra has stability and can do things like chmodr and regex on files, we can revisit. But until then, I'd like to keep what you have as a separate module. We'd accept a PR though to the readme to inform people that this is a complementary module.

@jprichardson thanks for the comment! As you can see, PR is up :3

Considering closed by #534. Tagging as future to remind about merging.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

RyanZim picture RyanZim  Â·  7Comments

louwers picture louwers  Â·  4Comments

ZFail picture ZFail  Â·  7Comments

ubershmekel picture ubershmekel  Â·  6Comments

laurent22 picture laurent22  Â·  8Comments