Home > data-utility > copy_subject_file.m

copy_subject_file

PURPOSE ^

COPY_SUBJECT_FILE copy a file from one place in a subject dir to another

SYNOPSIS ^

function copy_subject_file(subject, source, dest, varargin)

DESCRIPTION ^

COPY_SUBJECT_FILE copy a file from one place in a subject dir to another

 Usage:
   copy_subject_file(SUBJECT, SOURCE, DESTINATION)
       Within the SUBJECT's directory, copy a file from one place to
       another.  If the DESTINATION file already exists, or if the SOURCE
       file does not exist, an exception is thrown.  COPYFILE, which is
       used internally, may also throw exceptions of its own.  If the
       DESTINATION's directory is not there, we try to make it.

   copy_subject_file(..., 'dry')
       A "dry run": show what would be done.  If an exception would be
       thrown, it is thrown in this case too (except for ones generated
       directly by COPYFILE).

   copy_subject_file(..., 'quiet')
       Don't say what's happening.

   copy_subject_file(..., 'force')
       Don't give up if the destination file already exists.  Try to copy
       over it, if possible.

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

0001 function copy_subject_file(subject, source, dest, varargin)
0002 %COPY_SUBJECT_FILE copy a file from one place in a subject dir to another
0003 %
0004 % Usage:
0005 %   copy_subject_file(SUBJECT, SOURCE, DESTINATION)
0006 %       Within the SUBJECT's directory, copy a file from one place to
0007 %       another.  If the DESTINATION file already exists, or if the SOURCE
0008 %       file does not exist, an exception is thrown.  COPYFILE, which is
0009 %       used internally, may also throw exceptions of its own.  If the
0010 %       DESTINATION's directory is not there, we try to make it.
0011 %
0012 %   copy_subject_file(..., 'dry')
0013 %       A "dry run": show what would be done.  If an exception would be
0014 %       thrown, it is thrown in this case too (except for ones generated
0015 %       directly by COPYFILE).
0016 %
0017 %   copy_subject_file(..., 'quiet')
0018 %       Don't say what's happening.
0019 %
0020 %   copy_subject_file(..., 'force')
0021 %       Don't give up if the destination file already exists.  Try to copy
0022 %       over it, if possible.
0023 %
0024 copymove_subject_file('copy', subject, source, dest, varargin{:});

Generated on Tue 23-May-2017 20:00:55 by m2html © 2005