/// <summary>
        /// Moves the source directory to the specified destination.
        /// </summary>
        /// <param name="provider">The directory provider.</param>
        /// <param name="source">The source path.</param>
        /// <param name="destination">The destination path.</param>
        public static void Move(this IDirectoryProvider provider, DirectoryPath source, DirectoryPath destination)
        {
            if (provider is null)
            {
                throw new System.ArgumentNullException(nameof(provider));
            }

            var directory = provider.Retrieve(source);

            directory.Move(destination);
        }
示例#2
0
 /// <summary>
 /// Get the relative path to another directory.
 /// </summary>
 /// <param name="to">The target directory path.</param>
 /// <returns>A <see cref="DirectoryPath"/>.</returns>
 public DirectoryPath GetRelativePath(DirectoryPath to)
 {
     return(GetDirectory().GetRelativePath(to));
 }