System.Net.FtpClient.FtpExtensions.GetFtpDirectoryName C# (CSharp) 메소드

GetFtpDirectoryName() 공개 정적인 메소드

Gets the directory name of a path formatted for a FTP server
public static GetFtpDirectoryName ( this path ) : string
path this The path
리턴 string
        public static string GetFtpDirectoryName(this string path)
        {
            if (path == null || path.Length == 0 || path.GetFtpPath() == "/")
                return "/";

            return System.IO.Path.GetDirectoryName(path).GetFtpPath();
        }