public void SetCurrentDirectory(string directoryPath)
{
if (!IsConnected)
throw new InvalidOperationException("You must be connected to the FTP server before you can set the current directory.");
if (directoryPath.Length > 0)
{
m_currentState.CurrentDirectory = new FtpDirectory((FtpSessionConnected)m_currentState, CaseInsensitive, directoryPath);
m_currentState.CurrentDirectory.Refresh();
}
}