Skip to contents

Single source of truth mapping a write_formats() value to its output file extension. Used by the internal write_expr() builder and by the download handlers of new_write_block() and new_download_block().

Usage

format_extension(format, needs_zip = FALSE)

Arguments

format

Character. One of the values in write_formats().

needs_zip

Logical. If TRUE, returns ".zip" regardless of format (for multi-input non-Excel downloads). Default: FALSE.

Value

Character scalar, e.g. ".csv", ".xlsx", ".parquet", ".feather", or ".zip".