Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Differing units between Windows and darwin #25

Open
clovenski opened this issue Sep 16, 2021 · 3 comments
Open

Differing units between Windows and darwin #25

clovenski opened this issue Sep 16, 2021 · 3 comments

Comments

@clovenski
Copy link

I took a look at how darwin is getting the disk info, and see that it uses df -P, which I believe outputs in counts of 512 bytes.
Comparing this with what Windows is doing with wmic, I think Windows outputs in plain bytes. This should be properly documented if this is really the case.

For context, I've experienced false positives on darwin in a platform-agnostic app.

@Ekristoffe
Copy link
Contributor

Interesting.
I will check that this weekend.
thanks for the report.

@Ekristoffe
Copy link
Contributor

i just looked intoo it and you are right.
This is also true for linux.
Should we all base on 512 bytes like linux / darwin or in bytes like windows ?

@clovenski
Copy link
Author

I feel basing in bytes like Windows feels more natural.
As long as the unit is properly documented and honored on all platforms then either option is fine.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants