示例#1
0
 /// <summary>
 /// Copies a given folder and all its contents to a new destination.
 /// </summary>
 /// <param name="virtualFolderPath">A qualified name (corresponding to
 /// <see cref="VirtualResourceInfo.FullName"/> that identifies the resource
 /// in the file system.</param>
 /// <param name="destinationPath">The new path of the resource. Can be another name
 /// for the resource itself.</param>
 /// <returns>A <see cref="VirtualFolderInfo"/> object that represents the new
 /// directory in the file system.</returns>
 /// <exception cref="ArgumentNullException">If any of the parameters is a
 /// null reference.</exception>
 /// <exception cref="ResourceAccessException">In case of invalid or prohibited
 /// resource access, or if the operation is not possible (e.g. a resource being
 /// moved/copied to itself).</exception>
 /// <exception cref="VirtualResourceNotFoundException">If the resource that
 /// should be moved does not exist in the file system.</exception>
 /// <exception cref="ResourceOverwriteException">If a resource that matches the
 /// submitted <paramref name="destinationPath"/> already exists.</exception>
 public override VirtualFolderInfo CopyFolder(string virtualFolderPath, string destinationPath)
 {
     return(SecureFunc(FileSystemTask.FolderCopyRequest,
                       () => OperationService.CopyFolder(virtualFolderPath, destinationPath),
                       () =>
                       String.Format("Could not copy folder [{0}] to destination [{1}].", virtualFolderPath,
                                     destinationPath)));
 }