Class DirectoryCopier
- Namespace
- RadioExt_Helper.utility
- Assembly
- RadioExt-Helper.dll
Provides methods to copy all directories and files within a parent directory to a different directory.
public class DirectoryCopier
- Inheritance
-
DirectoryCopier
- Inherited Members
Remarks
Initializes the DirectoryCopier with a BackgroundWorker for progress reporting.
Constructors
DirectoryCopier(BackgroundWorker)
Provides methods to copy all directories and files within a parent directory to a different directory.
public DirectoryCopier(BackgroundWorker worker)
Parameters
worker
BackgroundWorker- The BackgroundWorker to use for progress reporting.
Remarks
Initializes the DirectoryCopier with a BackgroundWorker for progress reporting.
Properties
CurrentFile
public string CurrentFile { get; }
Property Value
Methods
CopyDirectory(string, string, bool)
Copies all directories and files from the source directory to the destination directory.
public void CopyDirectory(string sourceDir, string destDir, bool copySubDirs)
Parameters
sourceDir
string- The source directory path.
destDir
string- The destination directory path.
copySubDirs
bool- Indicates whether to copy subdirectories and their contents.
Exceptions
- DirectoryNotFoundException
- Thrown when the source directory does not exist or cannot be found.