![]() |
Indy + IdFTPListParseVMS
Hallo DP'ler!
Ich muß Dateien mit FTP vom Server herunterladen (TIdFTP). Es gibt spezielle Dateien zum "Aufbereiten" der Daten vom Server (in meinem Fall VMS). Hier ein kleiner Ausschnitt aus dem File IdFTPListParseVMS:
Delphi-Quellcode:
Jetzt meine Frage: Wenn ich auf die Parameter BlockSize oder NumberBlocks zugreifen möchte - wie stelle ich das an?
type
TIdVMSFTPListItem = class(TIdOwnerFTPListItem) protected FGroupName : String; FVMSOwnerPermissions: String; FVMSWorldPermissions: String; FVMSSystemPermissions: String; FVMSGroupPermissions: String; FNumberBlocks : Integer; FBlockSize : Integer; FVersion : Integer; public property GroupName : String read FGroupName write FGroupName; property VMSSystemPermissions : String read FVMSSystemPermissions write FVMSSystemPermissions; property VMSOwnerPermissions : String read FVMSOwnerPermissions write FVMSOwnerPermissions; property VMSGroupPermissions : String read FVMSGroupPermissions write FVMSGroupPermissions; property VMSWorldPermissions : String read FVMSWorldPermissions write FVMSWorldPermissions; property Version : Integer read FVersion write FVersion; property NumberBlocks : Integer read FNumberBlocks write FNumberBlocks; property BlockSize : Integer read FBlockSize write FBlockSize; end; Ich geb's ja zu - ich steh' momentan auf der Leitung. Danke für Eure Hilfe Ines P.S. Ich verwende Delphi2009 und Win XP. |
Re: Indy + IdFTPListParseVMS
Hi Ines,
Du liest den Verzeichnisinhalt normal aus, z.B.
Delphi-Quellcode:
Danach kannst Du auf die VMS Details z.B. so zugreifen:
uses
..., IdFTPListParseVMS; ... begin IdFTP1.ChangeDir('/mydir'); IdFTP1.List; // füllt DirectoryListing end;
Delphi-Quellcode:
Es wird also nur auf die Klasse des DirectoryListing-Eintrags geprüft und wenn dieser ein VMS-Eintrag ist ein harter Cast durchgeführt, um die Details zu erreichen.
for i := 0 to IdFTP1.DirectoryListing.Count-1 do
begin // hier normale Details abfragen ... if IdFTP1.DirectoryListing[i] is TIdVMSFTPListItem then begin // Details nur für VMS abfragen: s := TIdVMSFTPListItem(IdFTP1.DirectoryListing[i]).GroupName; i := TIdVMSFTPListItem(IdFTP1.DirectoryListing[i]).BlockSize; end; end; Hoffe, das ist verständlich und hilft. Gruß, Assertor |
Re: Indy + IdFTPListParseVMS
Hallo Assertor,
danke für Deine Hilfe - es klappt! Du hast mir viel Zeit gespart - jetzt kann ich an meinem Projekt weiterarbeiten. Einen schönen Tag Ines |
Re: Indy + IdFTPListParseVMS
Hi Ines,
Zitat:
Gruß Assertor :dp: |
Alle Zeitangaben in WEZ +1. Es ist jetzt 18:33 Uhr. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024-2025 by Thomas Breitkreuz