12/08/88 copy_dir_ Copies a subtree from one point in the hierarchy to another, and optionally deletes the source subtree. Entry points in copy_dir_: (List is generated by the help command) :Entry: copy_dir_: 12/08/88 copy_dir_ Function: Copies a subtree from one point in the hierarchy to another, and optionally deletes the source subtree. Syntax: dcl copy_dir_ entry(char(*), char(*), char(*), char(*), ptr, fixed bin(35)); call copy_dir_ (caller, source_dir, source_ename, target_dir, target_ename, pcopy_dir_options, code); Arguments: caller is the name of the calling procedure. (Input) source_dir is the pathname of the source directory. (Input) source_ename is the source entry name. (Input) target_dir is the pathname of the target directory. (Input) target_ename is the target entry name. (Input) pcopy_dir_options is a pointer to the copy_dir_options structure shown below under "Info Structure". (Input) code is a standard system status code. (Output) Info structure: The following structure is declared in copy_dir_options.incl.pl1: dcl 1 copy_dir_options aligned based(pcopy_dir_options), 2 version fixed bin, 2 entry_control aligned, 3 link bit(1) unal, 3 seg bit(1) unal, 3 dir bit(1) unal, 3 msf bit(1) unal, 3 nnlk bit(1) unal, 3 pad1 bit(31) unal, 2 operation_control aligned, 3 delete bit(1) unal, 3 brief bit(1) unal, 3 force bit(1) unal, 3 replace bit(1) unal, 3 update bit(1) unal, 3 acl bit(1) unal, 3 primary bit(1) unal, 3 link_translation bit(1) unal, 3 chase bit(1) unal, 3 parent_ac_sw bit(1) unal, 3 pad2 bit(26) unal; dcl copy_dir_options_version_0 fixed bin init(0) int static options (constant); dcl pcopy_dir_options ptr; Structure elements: version is the version number of this structure, currently copy_dir_options_version_0. link if set to "1"b then links are copied. seg if set to "1"b then segments are copied. dir if set to "1"b then inferior directories are copied. If this is not set then the subtree is not walked. msf if set to "1"b then multisegment-files are copied. nnlk if set to "1"b then non-null links are copied. pad1 is unused and must be zero. delete if set to "1"b then the source_dir is deleted after the copying is complete. brief if set to "1"b suppresses the printing of warning messages such as "Bit count is inconsistent with current length" and "Current length is not the same as records used". force if set to "1"b executes, when target_dir already exists, without asking the user. If force is not set, the user is queried. replace if set to "1"b deletes the existing contents of target_dir before the copying begins. If target_dir is non-existent or empty, this control argument has no effect. The default is to append the contents of source_dir to the existing contents of target_dir. Setting of replace conflicts with the setting of update, and error_table_$inconsistent is returned. update if set to "1"b causes copying of only those entries in source_dir that have comparable entries in target_dir. Setting of update conflicts with the setting of replace, and error_table_$inconsistent is returned. acl if set to "1"b gives the ACL on the source_dir entry to its copy in target_dir. Although initial ACLs are still copied, they are not used in setting the ACL of the new entries when not set. primary if set to "1"b only primary names are copied. If not set, all the names of the selected entries are copied. link_translation if set to "1"b then links will be translated. If there are references to the source directory in the link pathname of a link being copied, the link pathname is changed to refer to the target directory. chase if set to "1"b copies the target of a link. Chasing links eliminates link translation. parent_ac_sw if set to "1"b when target directories need creating. The access class of the target_dir is obtained from the target's parent directory. Otherwise, the access class is determined from the source_dir. This switch may be used by privileged applications to make a downgraded copy of an upgraded hierarchy. The caller must have previously set the seg and dir AIM privileges in order to read the contents to the upgraded hierarchy. pad2 is unused and must be zero. Access required: Status permission is required for source_dir and all of the directories in its tree. Status permission is required for the directory containing source_dir. Read access is required on all files under source_dir. Append and modify permission are required for the directory containing target_dir if target_dir does not exist. Modify and append permission are required on target_dir if it already exists. If acl is not specified, the system default ACLs are added, then the initial ACL for the containing directory is applied (which may change the system supplied ACL). Initial ACLs are always copied for the current ring of execution. Notes: If target_dir already exists and force is not specified, the user is so informed and asked if processing should continue. If target_dir is contained in source_dir, an appropriate error message is printed and the subroutine returns. If name duplication occurs while appending the source_dir to the target_dir and the name duplication is between directories, the user is queried whether processing should continue. If the user answers yes, the contents of the directory are copied (appended) but none of the attributes of that directory are copied. If the answer is no, the directory and its subtree is skipped. If name duplication should occur between segments, the user is asked whether to delete the existing one in target_dir. If replace is specified or target_dir does not exist, name duplication does not occur. If part of the tree is not copied (by specifying a storage system entry key), problems with link translation may occur. If the link target in the source_dir tree was in the part of the tree not copied, there may be no corresponding entry in the target_dir tree. Hence, translation of the link causes the link to become null. If copying a non-empty mailbox requires that the max_length characteristic of the source be applied to the target, then the target max_length value will take on the default value that was given it when created. ----------------------------------------------------------- Historical Background This edition of the Multics software materials and documentation is provided and donated to Massachusetts Institute of Technology by Group BULL including BULL HN Information Systems Inc. as a contribution to computer science knowledge. This donation is made also to give evidence of the common contributions of Massachusetts Institute of Technology, Bell Laboratories, General Electric, Honeywell Information Systems Inc., Honeywell BULL Inc., Groupe BULL and BULL HN Information Systems Inc. to the development of this operating system. Multics development was initiated by Massachusetts Institute of Technology Project MAC (1963-1970), renamed the MIT Laboratory for Computer Science and Artificial Intelligence in the mid 1970s, under the leadership of Professor Fernando Jose Corbato. Users consider that Multics provided the best software architecture for managing computer hardware properly and for executing programs. Many subsequent operating systems incorporated Multics principles. Multics was distributed in 1975 to 2000 by Group Bull in Europe , and in the U.S. by Bull HN Information Systems Inc., as successor in interest by change in name only to Honeywell Bull Inc. and Honeywell Information Systems Inc. . ----------------------------------------------------------- Permission to use, copy, modify, and distribute these programs and their documentation for any purpose and without fee is hereby granted,provided that the below copyright notice and historical background appear in all copies and that both the copyright notice and historical background and this permission notice appear in supporting documentation, and that the names of MIT, HIS, BULL or BULL HN not be used in advertising or publicity pertaining to distribution of the programs without specific prior written permission. Copyright 1972 by Massachusetts Institute of Technology and Honeywell Information Systems Inc. Copyright 2006 by BULL HN Information Systems Inc. Copyright 2006 by Bull SAS All Rights Reserved