Skip to contents

vsi_get_disk_free_space() returns the free disk space available on the filesystem. Wrapper for VSIGetDiskFreeSpace() in the GDAL Common Portability Library.

Usage

vsi_get_disk_free_space(path)

Arguments

path

Character string. A directory of the filesystem to query.

Value

Numeric scalar. The free space in bytes, or -1 in case of error.

Examples

tmp_dir <- file.path(tempdir(), "tmpdir")
vsi_mkdir(tmp_dir)
vsi_get_disk_free_space(tmp_dir)
#> [1] 20364963840
vsi_rmdir(tmp_dir)