SharpCifs.Smb.SmbFile.GetParent C# (CSharp) Method

GetParent() public method

Everything but the last component of the URL representing this SMB resource is effectivly it's parent.
Everything but the last component of the URL representing this SMB resource is effectivly it's parent. The root URL smb:// does not have a parent. In this case smb:// is returned.
public GetParent ( ) : string
return string
        public virtual string GetParent()
        {
            string str = Url.Authority;
            if (str.Length > 0)
            {
                StringBuilder sb = new StringBuilder("smb://");
                sb.Append(str);
                GetUncPath0();
                if (_canon.Length > 1)
                {
                    sb.Append(_canon);
                }
                else
                {
                    sb.Append('/');
                }
                str = sb.ToString();
                int i = str.Length - 2;
                while (str[i] != '/')
                {
                    i--;
                }
                return Runtime.Substring(str, 0, i + 1);
            }
            return "smb://";
        }