how to determine if a object dir or file is? (wodSFTP / wodSFTP.NET / wodSFTPdll)
Hello,
I have now a list of objects created with
ListNames() method.
I must know, if a list member dir or file is.
So, I check an exception:
try
{
bDir = false;
if(!pFtpCom->CheckDir(lpTestDir))
{
bDir = true;
}
} catch(...){pFtpCom->PutLastError(0);};
if(!bDir)
try
{
pFtpCom->GetFile(vLclDir,name);
}
catch(...)
{
pFtpCom->get_LastError(&LastError);
_bstr_t err = pFtpCom->GetErrorText(LastError);
printf( ( d ) s
,LastError,(LPSTR)err);
pFtpCom->PutLastError(0);
}
}
It works with error:
If the first item found is a dir, and the next one a file,
it will be the next exception thrown. It should not!
If the first item found is a file, it will be get without any exception.
Is there any other workaround, how to determine if an list item
dir or file is?
Thanks
Jan
[:wink:]
Complete thread:
- how to determine if a object dir or file is? - Jan, 2005-02-17, 12:00
- Re: how to determine if a object dir or file is? - wodSupport, 2005-02-17, 13:43
- Re: how to determine if a object dir or file is? - Jan, 2005-02-17, 14:20
- Re: how to determine if a object dir or file is? - wodSupport, 2005-02-17, 14:45
- Re: how to determine if a object dir or file is? - Jan, 2005-02-17, 14:52
- Re: how to determine if a object dir or file is? - wodSupport, 2005-02-17, 14:54
- Re: how to determine if a object dir or file is? - Jan, 2005-02-17, 14:52
- Re: how to determine if a object dir or file is? - wodSupport, 2005-02-17, 14:45
- Re: how to determine if a object dir or file is? - Jan, 2005-02-17, 14:20
- Re: how to determine if a object dir or file is? - wodSupport, 2005-02-17, 13:43