[fs.enum.copy.opts]

# 31 Input/output library [[input.output]](./#input.output)

## 31.12 File systems [[filesystems]](filesystems#fs.enum.copy.opts)

### 31.12.8 Enumerations [[fs.enum]](fs.enum#copy.opts)

#### 31.12.8.3 Enum class copy_options [fs.enum.copy.opts]

[1](#1)

[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/iostreams.tex#L15766)

The enum class type copy_options is a bitmask type ([[bitmask.types]](bitmask.types "16.3.3.3.3 Bitmask types")) that specifies bitmask constants used to control the semantics of
copy operations[.](#1.sentence-1)

The constants are specified in option groups with the meanings listed in Table [150](#tab:fs.enum.copy.opts "Table 150: Enum class copy_­options")[.](#1.sentence-2)

The constant none represents the empty bitmask, and
is shown in each option group for purposes of exposition;
implementations shall provide only a single definition[.](#1.sentence-3)

Every other constant in the table represents a distinct bitmask element[.](#1.sentence-4)

Table [150](#tab:fs.enum.copy.opts) — Enum class copy_options [[tab:fs.enum.copy.opts]](./tab:fs.enum.copy.opts)  

| [ð](#tab:fs.enum.copy.opts-row-1)<br>**Option group controlling copy_file function effects for existing target files** | |
| --- | --- |
| [ð](#tab:fs.enum.copy.opts-row-2)<br>**Constant** | **Meaning** |
| [ð](#tab:fs.enum.copy.opts-row-3)<br>[none](#lib:copy_options,none "31.12.8.3 Enum class copy_­options [fs.enum.copy.opts]") | (Default) Error; file already exists[.](#tab:fs.enum.copy.opts-row-3-column-2-sentence-1) |
| [ð](#tab:fs.enum.copy.opts-row-4)<br>[skip_existing](#lib:copy_options,skip_existing "31.12.8.3 Enum class copy_­options [fs.enum.copy.opts]") | Do not overwrite existing file, do not report an error[.](#tab:fs.enum.copy.opts-row-4-column-2-sentence-1) |
| [ð](#tab:fs.enum.copy.opts-row-5)<br>[overwrite_existing](#lib:copy_options,overwrite_existing "31.12.8.3 Enum class copy_­options [fs.enum.copy.opts]") | Overwrite the existing file[.](#tab:fs.enum.copy.opts-row-5-column-2-sentence-1) |
| [ð](#tab:fs.enum.copy.opts-row-6)<br>[update_existing](#lib:copy_options,update_existing "31.12.8.3 Enum class copy_­options [fs.enum.copy.opts]") | Overwrite the existing file if it is older than the replacement file[.](#tab:fs.enum.copy.opts-row-6-column-2-sentence-1) |
| [ð](#tab:fs.enum.copy.opts-row-7)<br>**Option group controlling copy function effects for subdirectories** | |
| [ð](#tab:fs.enum.copy.opts-row-8)<br>**Constant** | **Meaning** |
| [ð](#tab:fs.enum.copy.opts-row-9)<br>[none](#lib:copy_options,none "31.12.8.3 Enum class copy_­options [fs.enum.copy.opts]") | (Default) Do not copy subdirectories[.](#tab:fs.enum.copy.opts-row-9-column-2-sentence-1) |
| [ð](#tab:fs.enum.copy.opts-row-10)<br>[recursive](#lib:copy_options,recursive "31.12.8.3 Enum class copy_­options [fs.enum.copy.opts]") | Recursively copy subdirectories and their contents[.](#tab:fs.enum.copy.opts-row-10-column-2-sentence-1) |
| [ð](#tab:fs.enum.copy.opts-row-11)<br>**Option group controlling copy function effects for symbolic links** | |
| [ð](#tab:fs.enum.copy.opts-row-12)<br>**Constant** | **Meaning** |
| [ð](#tab:fs.enum.copy.opts-row-13)<br>[none](#lib:copy_options,none "31.12.8.3 Enum class copy_­options [fs.enum.copy.opts]") | (Default) Follow symbolic links[.](#tab:fs.enum.copy.opts-row-13-column-2-sentence-1) |
| [ð](#tab:fs.enum.copy.opts-row-14)<br>[copy_symlinks](#lib:copy_options,copy_symlinks "31.12.8.3 Enum class copy_­options [fs.enum.copy.opts]") | Copy symbolic links as symbolic links rather than copying the files that  they point to[.](#tab:fs.enum.copy.opts-row-14-column-2-sentence-1) |
| [ð](#tab:fs.enum.copy.opts-row-15)<br>[skip_symlinks](#lib:copy_options,skip_symlinks "31.12.8.3 Enum class copy_­options [fs.enum.copy.opts]") | Ignore symbolic links[.](#tab:fs.enum.copy.opts-row-15-column-2-sentence-1) |
| [ð](#tab:fs.enum.copy.opts-row-16)<br>**Option group controlling copy function effects for choosing the form of copying** | |
| [ð](#tab:fs.enum.copy.opts-row-17)<br>**Constant** | **Meaning** |
| [ð](#tab:fs.enum.copy.opts-row-18)<br>[none](#lib:copy_options,none "31.12.8.3 Enum class copy_­options [fs.enum.copy.opts]") | (Default) Copy content[.](#tab:fs.enum.copy.opts-row-18-column-2-sentence-1) |
| [ð](#tab:fs.enum.copy.opts-row-19)<br>[directories_only](#lib:copy_options,directories_only "31.12.8.3 Enum class copy_­options [fs.enum.copy.opts]") | Copy directory structure only, do not copy non-directory files[.](#tab:fs.enum.copy.opts-row-19-column-2-sentence-1) |
| [ð](#tab:fs.enum.copy.opts-row-20)<br>[create_symlinks](#lib:copy_options,create_symlinks "31.12.8.3 Enum class copy_­options [fs.enum.copy.opts]") | Make symbolic links instead of copies of files[.](#tab:fs.enum.copy.opts-row-20-column-2-sentence-1)<br>The source path shall be  an absolute path unless the destination path is in the current directory[.](#tab:fs.enum.copy.opts-row-20-column-2-sentence-2) |
| [ð](#tab:fs.enum.copy.opts-row-21)<br>[create_hard_links](#lib:copy_options,create_hard_links "31.12.8.3 Enum class copy_­options [fs.enum.copy.opts]") | Make hard links instead of copies of files[.](#tab:fs.enum.copy.opts-row-21-column-2-sentence-1) |
