You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by "michael-o (via GitHub)" <gi...@apache.org> on 2023/11/23 13:25:41 UTC
Re: [PR] [IO-822] add a file size conversion tool. [commons-io]
michael-o commented on code in PR #515:
URL: https://github.com/apache/commons-io/pull/515#discussion_r1403384904
##########
src/main/java/org/apache/commons/io/FileSizeUnit.java:
##########
@@ -0,0 +1,234 @@
+package org.apache.commons.io;
+
+import java.text.DecimalFormat;
+
+/**
+ * File size conversion tool, supporting mutual conversion of TB, GB, MB, KB, Byte, etc.,
+ * as well as converting the size of numeric types into human-readable strings.
+ * @author hellozrh
+ * @date 2023-11-19
+ */
+public enum FileSizeUnit {
+ /**Byte*/
+ BYTE {
+ @Override
+ public long toByte(long duration) {
Review Comment:
Duration?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@commons.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org