Size in Byte of file(s)

Share:

Description

Function for getting size of any files.

Usage

1

Arguments

file

Character vector of file(s) with path.

units

Character, default "B" bytes or alternative: "KB", "MB", "GB" or "TB" for kilo Bytes, mega Bytes, giga Bytes and tera Bytes.

Value

numeric Vector with the same length of available input files in the unit specified by argument. Directories are excluded!

Author(s)

Matteo Mattiuzzi

Examples

1
2
3
4
## Not run: 
file.size(list.files("./"))

## End(Not run)