Skip to content
Commit 71e11ae9 authored by Juan Yescas's avatar Juan Yescas
Browse files

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
parent 3023a334
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment