System.Net.FtpControlStream.GetLoginDirectory C# (CSharp) Method

GetLoginDirectory() private method

Parses a response string for our login dir in " "

private GetLoginDirectory ( string str ) : string
str string
return string
        private string GetLoginDirectory(string str)
        {
            int firstQuote = str.IndexOf('"');
            int lastQuote = str.LastIndexOf('"');
            if (firstQuote != -1 && lastQuote != -1 && firstQuote != lastQuote)
            {
                return str.Substring(firstQuote + 1, lastQuote - firstQuote - 1);
            }
            else
            {
                return String.Empty;
            }
        }