Re: ListDirData Event - WeOnlyDo Discussion board

Re: ListDirData Event (General questions)

by David Lucas, Wednesday, December 22, 2010, 11:21 (5086 days ago) @ David Lucas

Sort of making progress, the following works properly with IE if wodFTPD is in normal FTP mode, but still doesn't come out right in SFTP mode:

void __fastcall TForm1::ServerListDirData(TObject * Sender, IFtpUser* User,
OleVariant &DirData, OleVariant &NamesOnly)
{
AnsiString ClientFileList = -rw-rw-rw- 1 root root 449 Aug 18 14:04 test.txt

-rw-rw-rw- 1 root root 40939 Jan 18 12:02 test.html ;

DirData.ArrayRedim(ClientFileList.Length()+1);

void *pBuff = DirData.ArrayLock();
memcpy(pBuff, ClientFileList.c_str(), ClientFileList.Length());
((char*)pBuff)[ClientFileList.Length()] = '';
DirData.ArrayUnlock();

NamesOnly.VBoolean = false;
}

The minus symbols on the end of the permissions were missing in your example which meant it wasn't formatting correctly in IE. However, still no joy in getting it to work properly when the protocol is set to SFTP.


Complete thread: