| 1 |
% Generated by roxygen2: do not edit by hand |
| 2 |
% Please edit documentation in R/fs_bytes.R |
| 3 |
\name{fs_bytes} |
| 4 |
\alias{fs_bytes} |
| 5 |
\alias{as_fs_bytes} |
| 6 |
\title{Human readable file sizes} |
| 7 |
\usage{ |
| 8 |
as_fs_bytes(x) |
| 9 |
|
| 10 |
fs_bytes(x) |
| 11 |
} |
| 12 |
\arguments{ |
| 13 |
\item{x}{A numeric or character vector. Character representations can use |
| 14 |
shorthand sizes (see examples).} |
| 15 |
} |
| 16 |
\description{ |
| 17 |
Construct, manipulate and display vectors of file sizes. These are numeric |
| 18 |
vectors, so you can compare them numerically, but they can also be compared |
| 19 |
to human readable values such as '10MB'. |
| 20 |
} |
| 21 |
\examples{ |
| 22 |
fs_bytes("1") |
| 23 |
fs_bytes("1K") |
| 24 |
fs_bytes("1Kb") |
| 25 |
fs_bytes("1Kib") |
| 26 |
fs_bytes("1MB") |
| 27 |
|
| 28 |
fs_bytes("1KB") < "1MB" |
| 29 |
|
| 30 |
sum(fs_bytes(c("1MB", "5MB", "500KB"))) |
| 31 |
} |