/// <summary> /// Clean up this object and release all of it's resources. /// </summary> public override void Dispose() { base.Dispose(); this._parent = null; this._files = null; this._dirs = null; }
/// <summary> /// Loads the file and directory listing /// </summary> void LoadListing() { FtpFileSystemObjectList <FtpDirectory> dirs = new FtpFileSystemObjectList <FtpDirectory>(); FtpFileSystemObjectList <FtpFile> files = new FtpFileSystemObjectList <FtpFile>(); foreach (FtpListItem i in this.Client.GetListing(this.FullName)) { if (i.Type == FtpObjectType.Directory) { dirs.Add(new FtpDirectory(this.Client, this, i)); } else if (i.Type == FtpObjectType.File) { files.Add(new FtpFile(this.Client, this, i)); } } this._dirs = dirs; this._files = files; }
/// <summary> /// Clears the file listing results /// </summary> public void ClearListing() { this._dirs = null; }