dash.file.new
Do setup tasks for new files
Syntax
Description
Gives the filename a default extension if it does not already have the extension. Throws error if the file exists and overwriting is not enabled. Returns the filename as a string.
Use a custom header for error IDs.
Input Arguments
filename
string scalar
The name of a new file
ext
string scalar | empty matrix
A default extension for the filename. If an empty matrix, does not apply a default extension.
overwrite
scalar logical
Whether existing files can be overwritten (true) or not (false).
header
string scalar
Header for thrown error IDs. Default is “DASH:file:new”.
Output Arguments
filename
string scalar
The absolute path to the new file