Extension methods for DirectoryInfo.
More... |
| static DirectoryInfo | CopyTo (this DirectoryInfo source, string destinationPath, bool recursive=true, bool overwrite=false) |
| | Copies an existing directory to a new directory, optionally recursive, optionally overwriting. More...
|
| |
Extension methods for DirectoryInfo.
◆ CopyTo()
| static DirectoryInfo BFGSDK.BuildProcessing.Extensions.DirectoryInfoExtensions.CopyTo | ( | this DirectoryInfo | source, | | | string | destinationPath, | | | bool | recursive = true, | | | bool | overwrite = false | | ) | | |
| inlinestatic |
Copies an existing directory to a new directory, optionally recursive, optionally overwriting.
- Parameters
| source | Directory to copy. |
| destinationPath | The desired path of the copied directory. |
| recursive | Whether the directory is copied recursively. If false, an IOException is thrown if the source directory is not empty. |
| overwrite | Whether files/directories are overwritten if they already exist. |
- Returns
- The new directory copy with a fully qualified path.
- Exceptions
| ArgumentNullException | source is null. |
| ArgumentException | destinationPath is invalid. |
| DirectoryNotFoundException | source does not exist. |
| IOException | Copy is non-recursive and source is not empty. |
Extension methods for DirectoryInfo.
More... |
| static DirectoryInfo | CopyTo (this DirectoryInfo source, string destinationPath, bool recursive=true, bool overwrite=false) |
| | Copies an existing directory to a new directory, optionally recursive, optionally overwriting. More...
|
| |
Extension methods for DirectoryInfo.
◆ CopyTo()
| static DirectoryInfo BFGSDK.BuildProcessing.Extensions.DirectoryInfoExtensions.CopyTo | ( | this DirectoryInfo | source, | | | string | destinationPath, | | | bool | recursive = true, | | | bool | overwrite = false | | ) | | |
| inlinestatic |
Copies an existing directory to a new directory, optionally recursive, optionally overwriting.
- Parameters
| source | Directory to copy. |
| destinationPath | The desired path of the copied directory. |
| recursive | Whether the directory is copied recursively. If false, an IOException is thrown if the source directory is not empty. |
| overwrite | Whether files/directories are overwritten if they already exist. |
- Returns
- The new directory copy with a fully qualified path.
- Exceptions
| ArgumentNullException | source is null. |
| ArgumentException | destinationPath is invalid. |
| DirectoryNotFoundException | source does not exist. |
| IOException | Copy is non-recursive and source is not empty. |