/// <summary> /// Copies the directory structure (and the files) to the destination directory. /// </summary> /// <param name="sourcePath">The source path.</param> /// <param name="destinationPath">The destination path.</param> /// <param name="overwriteExisting">if set to <c>true</c>, existing files will be overwriten.</param> /// <returns>The same instance of this <see cref="TRunner"/>.</returns> public virtual TRunner CopyDirectoryStructure(string sourcePath, string destinationPath, bool overwriteExisting) { CopyDirectoryStructureTask task = new CopyDirectoryStructureTask(sourcePath, destinationPath, overwriteExisting); RunTask(task); lastCopiedFilesList = task.CopiedFilesList; return(ReturnThisTRunner()); }
/// <summary> /// Copies the directory structure (and the files) to the destination directory. /// </summary> /// <param name="sourcePath">The source path.</param> /// <param name="destinationPath">The destination path.</param> /// <param name="overwriteExisting">if set to <c>true</c>, existing files will be overwriten.</param> /// <param name="inclusionRegexPattern">The inclusion Regular expression pattern. /// All files whose paths match this regular expression /// will be copied. If the <see cref="inclusionRegexPattern"/> is <c>null</c>, it will be ignored.</param> /// <param name="exclusionRegexPattern">The exclusion Regular expression pattern. /// All files whose paths match this regular expression /// will not be copied. If the <see cref="exclusionRegexPattern"/> is <c>null</c>, it will be ignored.</param> /// <returns>The same instance of this <see cref="TRunner"/>.</returns> public virtual TRunner CopyDirectoryStructure( string sourcePath, string destinationPath, bool overwriteExisting, string inclusionRegexPattern, string exclusionRegexPattern) { CopyDirectoryStructureTask task = new CopyDirectoryStructureTask(sourcePath, destinationPath, overwriteExisting); task.InclusionPattern = inclusionRegexPattern; task.ExclusionPattern = exclusionRegexPattern; RunTask(task); lastCopiedFilesList = task.CopiedFilesList; return(ReturnThisTRunner()); }