示例#1
0
        /// <summary>
        /// Copies the directory.
        /// </summary>
        public void CopyDirectory([NotNull] string path, [NotNull] string newPath, [CanBeNull] IFileSystem destinationSystem = null)
        {
            Validate.ArgumentNotNull(path, "path");
            Validate.ArgumentNotNull(newPath, "newPath");

            var op = new VirtualFileOperations(this, destinationSystem ?? this);
            op.CopyDirectory(path, newPath);
        }
示例#2
0
        /// <summary>
        /// Copies the directory to new destination.
        /// </summary>
        /// <param name="sourceDirectory">The source directory name. Must reference existing directory.</param>
        /// <param name="destination">The destination directory name. That is the name of directory which will be created.</param>
        /// <param name="destinationSystem">The destination system. Optional.</param>
        public void CopyDirectory([NotNull] string sourceDirectory, [NotNull] string destination, [CanBeNull] IFileSystem destinationSystem = null)
        {
            Validate.ArgumentNotNull(sourceDirectory, "sourceDirectory");
            Validate.ArgumentNotNull(destination, "destination");

            CheckDisposed();

            // implemented as a set of simple operations.
            var operations = new VirtualFileOperations(this, destinationSystem ?? this);
            operations.CopyDirectory(sourceDirectory, destination);
        }