30 Input/output library [input.output]

30.10 File systems [filesystems]

30.10.29 Enumerations [fs.enum] Enum class copy_­options [fs.enum.copy.opts]

The enum class type copy_­options is a bitmask type ([bitmask.types]) that specifies bitmask constants used to control the semantics of copy operations. The constants are specified in option groups with the meanings listed in Table 124. Constant none is shown in each option group for purposes of exposition; implementations shall provide only a single definition.

Table 124 — Enum class copy_­options
Option group controlling copy_­file function effects for existing target files
none (Default) Error; file already exists.
skip_­existing Do not overwrite existing file, do not report an error.
overwrite_­existing Overwrite the existing file.
update_­existing Overwrite the existing file if it is older than the replacement file.
Option group controlling copy function effects for sub-directories
none (Default) Do not copy sub-directories.
recursive Recursively copy sub-directories and their contents.
Option group controlling copy function effects for symbolic links
none (Default) Follow symbolic links.
copy_­symlinks Copy symbolic links as symbolic links rather than copying the files that they point to.
skip_­symlinks Ignore symbolic links.
Option group controlling copy function effects for choosing the form of copying
none (Default) Copy content.
directories_­only Copy directory structure only, do not copy non-directory files.
create_­symlinks Make symbolic links instead of copies of files. The source path shall be an absolute path unless the destination path is in the current directory.
create_­hard_­links Make hard links instead of copies of files.