RemObjects.InternetPack.Ftp.VirtualFtp.VirtualFtpServer.InvokeOnChangeDirectory C# (CSharp) Method

InvokeOnChangeDirectory() protected method

protected InvokeOnChangeDirectory ( FtpChangeDirectoryArgs e ) : void
e FtpChangeDirectoryArgs
return void
		protected override void InvokeOnChangeDirectory(FtpChangeDirectoryArgs e)
		{
			String lPath = e.NewDirectory;

			if (lPath.IndexOf('/') != 0)
				throw new Exception(String.Format("Not an absolute path: \"{0}\"", lPath));

			VirtualFtpSession lSession = (VirtualFtpSession)e.Session;
			IFtpFolder lFolder = RootFolder.DigForSubFolder(lPath.Substring(1), lSession);

			if (lFolder != null)
				((VirtualFtpSession)e.Session).CurrentFolder = lFolder;

			e.ChangeDirOk = (lFolder != null);
			base.InvokeOnChangeDirectory(e);
		}