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

Possibility to show filesize as byte and not bit #25

Closed
zauni opened this issue Apr 6, 2013 · 2 comments · Fixed by #26
Closed

Possibility to show filesize as byte and not bit #25

zauni opened this issue Apr 6, 2013 · 2 comments · Fixed by #26

Comments

@zauni
Copy link

zauni commented Apr 6, 2013

It would be nice to have an option to specify that one wants to see the size just in bytes.
On Windows it's not common to see filesizes in bits.

For example, I have a file which is 265318 bytes and it translates to 2.02Mb, which is correct, but I would like to have it translated to 259.10KB.

Would it be possible to have this option? :)

@avoidwork
Copy link
Owner

Hi,

I've added a new optional parameter to disable bit sizes. The second parameter is required to utilize the new functionality:

filesize(265318, 2, false) // 259.10KB

@zauni
Copy link
Author

zauni commented Apr 7, 2013

Thank you very much!

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

Successfully merging a pull request may close this issue.

2 participants