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