commit | 71e11ae9ba8e1f5716b7d1a5c77c1fea9a9442b7 | [log] [tgz] |
---|---|---|
author | Juan Yescas <jyescas@google.com> | Tue Aug 23 04:56:59 2022 +0000 |
committer | Juan Yescas <jyescas@google.com> | Tue Sep 27 15:11:05 2022 +0000 |
tree | b2a11d749a4cdbe970437bff8b011ee448a06433 | |
parent | 3023a3345543c8b4bced0cf98c5084ca9b884451 [diff] |
Add method to parse the size in FileUtils The method parseSize() will parse the strings that match the regular expression: "^((\\s*[-+]?[0-9]+)\\s*(B|K|KB|M|MB|G|GB|Ki|KiB|Mi|MiB|Gi|GiB)\\s*)$" For example: 12GB, +100MB, 23MiB. It will return the size in bytes. Test: atest Bug: 231718727 Change-Id: Id4b9084d2ff8a0a8bd23ddb8a7e10dcf17391c49