Path: Common/FileUtils
% Save the file at the path of the calling function.
Use dbstack to find the absolute path of the calling function, and create a
filename using the path.
Example:
fullname = FileFullpath( 'MyFile.txt', false )
fullname = '/Path/To/CallingFolder/MyFile_1.txt'
--------------------------------------------------------------------------
Form:
fullname = FileFullpath( filename, overwrite )
--------------------------------------------------------------------------
------
Inputs
------
filename '' The string name of the file, with extension. If no
extension is given it is assumed to be a mat-file.
overwrite (1) Flag whether to overwrite the existing file - default is
true - or to append the name of the file with a modifier
should it already exist. Filenames will be appended
with an underscore and a number starting with _0.
-------
Outputs
-------
fullname '' Full qualified filename
--------------------------------------------------------------------------
Back to the Common Module page