Table of Contents

obj.FilenameOnDisk

Motivation

This method can be used in scripted applications, for instance to store a result of a call to another method (e.g. PRT::CreateSDM) under a similar filename (see example below).

Reference ('obj.Help('FilenameOnDisk')')

 AFT::FilenameOnDisk  - returns the filename property
 
 FORMAT:       filename = obj.FilenameOnDisk;
 
 No input fields
 
 Output fields:
 
       filename    last used filename (on load or save)
 
 TYPES: ALL

Usage example

obj_FilenameOnDisk_example.m
% loading a protocol
prt = xff('*.prt');
 
% creating an SDM with
% - 240 volumes,
% - a TR of 2000 msec, and
% - no rest condition in the PRT
sdm = prt.CreateSDM(struct('nvol', 240, 'prtr', 2000, 'rcond', []));
 
% save under same filename with .sdm extension
sdm.SaveAs(strrep(prt.FilenameOnDisk, '.prt', '.sdm'));

Usage notes

The .FilenameOnDisk (property) method will return an empty string for object that have not been load from/saved to disk!