Ejemplo n.º 1
0
        /// <summary>
        /// Deletes the specified FTP directory.
        /// </summary>
        /// <param name="directory">The directory to delete.</param>
        public void DeleteDirectory(FtpDirectoryInfo directory)
        {
            if (directory == null)
                throw new ArgumentNullException("directory");

            this.DeleteDirectory(directory.Uri);
        }
Ejemplo n.º 2
0
        /// <summary>
        /// Deletes the specified FTP directory.
        /// </summary>
        /// <param name="directory">The directory to delete.</param>
        public void DeleteDirectory(FtpDirectoryInfo directory)
        {
            if (directory == null)
            {
                throw new ArgumentNullException("directory");
            }

            this.DeleteDirectory(directory.Uri);
        }
Ejemplo n.º 3
0
        /// <summary>
        /// Gets the directory info at the specified path.
        /// </summary>
        /// <param name="path">The path of the directory.</param>
        /// <returns>
        /// An <see cref="IDirectoryInfo"/> of the directory from the specified path.
        /// </returns>
        public IDirectoryInfo GetDirectoryInfo(string path)
        {
            path.ThrowIfNull(() => path);

            path = FtpFileSystem.NormalizePath(path);
            FlagFtp.FtpDirectoryInfo directory = this.client.GetDirectoryInfo(new Uri(path));

            return(new FtpDirectoryInfo(directory.FullName.Replace("%20", " "), this.client));
        }