mirror of
https://github.com/rclone/rclone.git
synced 2024-12-04 23:12:52 +08:00
e7bd392a69
This fixes an important bug with listing that affects users with more than 500 objects in a listing operation.
17 lines
396 B
Go
17 lines
396 B
Go
// Copyright (C) 2019 Storj Labs, Inc.
|
|
// See LICENSE for copying information.
|
|
|
|
package memory
|
|
|
|
// FormatBytes converts number of bytes to appropriately sized string.
|
|
func FormatBytes(bytes int64) string {
|
|
return Size(bytes).String()
|
|
}
|
|
|
|
// ParseString converts string to number of bytes.
|
|
func ParseString(s string) (int64, error) {
|
|
var size Size
|
|
err := size.Set(s)
|
|
return size.Int64(), err
|
|
}
|