Skip to contents

Write Data File with Hash Output

Usage

write_file_with_hash(
  data,
  path,
  overwrite = FALSE,
  ...,
  algo = "blake3",
  writer = NULL,
  force = FALSE
)

Arguments

data

the data object to write to file

path

the destination of the file (csv or parquet)

overwrite

boolean of whether to overwrite or not.

...

additional arguments for digest, write_csv, write_parquet, or writer.

algo

hashing algorithm to use, default is "blake3"

writer

optional function used to write the file, called as writer(data, path, ...). Required for file extensions this function doesn't know how to write. For a known extension (csv, parquet), writer is ignored unless force = TRUE.

force

if TRUE, use writer even for a known extension instead of the built-in writer. Must be FALSE (the default) when writer is not supplied.

Value

Nothing, File is created and hash of created file is printed

See also

Examples