diff options
| author | 2022-08-23 04:56:59 +0000 | |
|---|---|---|
| committer | 2022-09-27 15:11:05 +0000 | |
| commit | 71e11ae9ba8e1f5716b7d1a5c77c1fea9a9442b7 (patch) | |
| tree | b2a11d749a4cdbe970437bff8b011ee448a06433 /api/api_test.go | |
| 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
Diffstat (limited to 'api/api_test.go')
0 files changed, 0 insertions, 0 deletions