FTAM/9000 Programmer's Guide
206 Chapter 5
Using High Level, Context Free Functions
Copying and Moving FTAM Files (HLCF)
Copying and Moving FTAM Files (HLCF)
Use ft_fcopy() and ft_fcopy_aet() to copy files, and ft_fmove() and
ft_fmove_aet() to move files with only one call. Since copying or moving
files using low level calls requires most FTAM functions, you can save
significant coding time and effort using ft_fcopy(), ft_fcopy_aet(),
ft_fmove(), and ft_fmove_aet().
ft_fcopy()
#include %</opt/ftam/include/map.h>
#include %</opt/ftam/include/mapftam.h>
Return_code
ft_fcopy(source_dirname, source_filename, destination_dirname,
destination_filename, ae_label, return_event_name,
input_dcb, inout_dcb)
Ae_dir_name source_dirname;
Ft_filename source_filename;
Ae_dir_name destination_dirname;
Ft_filename destination_filename;
Ae_label *ae_label;
Local_event_name return_event_name;
struct Ft_fcopy_in_dcb *input_dcb;
struct Ft_fcopy_out_dcb **inout_dcb;
The ft_fcopy() function copies one FTAM file (contents and attributes) to
another FTAM file. The original file remains in tact. The new file
contains the source file attributes and those attributes that are
automatically set (e.g., filesize).
• If the file you are copying to already exists, the outcome depends on
how you set input_dcb->overwrite. If input_dcb->overwrite is set to
FT_RECREATE_FILE, FTAM copies the source file over the existing
destination file. If the value is FT_DONT_RECREATE_FILE, FTAM
does not copy the source file over the existing file, the function fails,
and you receive an error message.
NOTE The following points do not apply to HP–UX FTAM responders. HP–UX
FTAM responders do not use these fields. The information is provided
here because other implementations may use these fields.