If getformatwriter
is passed a
file
argument, it will be processed based on the registered
fileformats information and the ext
argument to give a final output
path in the $file
element of the returned list
.
If ext='.someext'
getformatwriter
will use the specified
extension to overwrite the default value returned by fileformats
.
If ext=NULL
, the default, and file='somefilename.someext'
then file
will be untouched and ext
will be set to
'someext'
(overriding the value returned by fileformats
).
If file='somefile_without_extension'
then the suppplied or
calculated extension will be appended to file
.
If ext=NA
then the input file
name will not be touched (even
if it has no extension at all).
Note that if ext=NULL
or ext=NA
, then only the specified
format or, failing that, the file
extension will be used to query
the fileformats database for a match.
See write.neuron
for code to make this discussion more
concrete.