free_disk_gb() returns the free space of the disk holding a path;
check_free_disk() stops when it falls below a minimum. Long collections
and OCR runs call it regularly: DuckDB writes fail badly on a full disk.
Usage
free_disk_gb(path = ".")
check_free_disk(path = ".", min_gb = getOption("coRpusdb.min_free_gb", 20))Value
free_disk_gb(): gigabytes (NA where df is not available).
check_free_disk(): the free space, invisibly.
See also
Other files:
backup_files(),
dated_file_name(),
write_gz_text()