線上訂房服務-台灣趴趴狗聯合訂房中心
發文 回覆 瀏覽次數:1325
推到 Plurk!
推到 Facebook!

Idftp要如何列出檔案的擁有者呢?

尚未結案
hotswin
中階會員


發表:72
回覆:92
積分:52
註冊:2003-11-06

發送簡訊給我
#1 引用回覆 回覆 發表時間:2008-01-10 03:32:25 IP:59.125.xxx.xxx 訂閱

[code delphi]
請在此區域輸入程式碼
var NewItem:TListItem;
i:integer;
LS: TStringList;
begin
Ls:=TStringList.Create;
ListView1.Clear;
IdFTP1.ChangeDir(DirName);
IdFTP1.List(Ls);
CurrentDirEdit.Text:=IdFTP1.RetrieveCurrentDir;
for i:=0 to IdFTP1.DirectoryListing.Count-1 do
begin
With IdFTP1.DirectoryListing.Items[i] do
begin
if (FileName='.') OR (FileName='..') then Continue;
NewItem:=ListView1.Items.Add;
NewItem.Caption:=FileName;
NewItem.SubItems.Add(IntToStr(Size));
if ItemType = ditDirectory then
begin
NewItem.StateIndex:=0;
NewItem.SubItems.Add('檔案目錄');
end
else
begin
NewItem.SubItems.Add('其他類型');
end;
NewItem.SubItems.Add(FormatDateTime('yyyy/mm/dd hh:mm', ModifiedDate));
NewItem.SubItems.Add(OwnerName);
end;
end;
[/code]
用Delphi內建的Indy ftp執行以下的代碼可以正卻的列出某一檔案的擁有者
=================
但自從我升級Indy Indy_9_00_14_src之後,當我執行編譯就會在這行報錯:
Undecred identified OwnerName NewItem.SubItems.Add(OwnerName);
----- 請問是怎麼回事呢??
------
xinjier禮品贈品
編輯記錄
hotswin 重新編輯於 2008-01-10 03:33:43, 註解 無‧
系統時間:2024-04-27 0:06:57
聯絡我們 | Delphi K.Top討論版
本站聲明
1. 本論壇為無營利行為之開放平台,所有文章都是由網友自行張貼,如牽涉到法律糾紛一切與本站無關。
2. 假如網友發表之內容涉及侵權,而損及您的利益,請立即通知版主刪除。
3. 請勿批評中華民國元首及政府或批評各政黨,是藍是綠本站無權干涉,但這裡不是政治性論壇!