MODIS (version 1.2.11)

fileSize: Get Size of File(s)

Description

Get the size of any file.

Usage

fileSize(file, units = c("B", "KB", "MB", "GB", "TB"))

Value

A numeric vector of the same length as 'file' (in 'units'). Note that directories are excluded.

Arguments

file

character vector of file(s) with path.

units

character, defaults to "B". Currently available options are c("B", "KB", "MB", "GB", "TB") for bites, kilo-, mega-, giga- and terabytes.

Author

Matteo Mattiuzzi

Examples

Run this code
if (FALSE) {
fileSize(list.files("./"))
}

Run the code above in your browser using DataLab