sfFTPLib.FTPItems

This forum is not monitored by the SmartFTP staff. If you have a license please contact technical support by email.
Post Reply
RBygrave
Posts: 24
Joined: Mon Jan 14, 2008 8:36 pm

sfFTPLib.FTPItems

Post by RBygrave » Fri Mar 22, 2013 3:18 pm

I am updateing old code and it appears that the sfFTPLib.FTPItems.Type is no longer avaiable. So what is the replacement? here is the old snipet of code
 
 
FTPItems items = _ftp.Items;
foreach (FTPItem objItem in items)
  {
   if (objItem.Type == enumItemType.ftpItemTypeRegular)
     {
       if (util.WildcardMatch((string)objItem.Name, FileMask, true))
         {
         al.Add((string)objItem.Name);
         }
     }
  }
 

mb
Posts: 12029
Joined: Thu Oct 11, 2001 1:24 pm
Display name: Mat (SmartFTP)
Contact:

Re: sfFTPLib.FTPItems

Post by mb » Fri Mar 22, 2013 3:30 pm

The Type member is still available (see sfFTPLib.idl). Maybe Type has been been renamed to "type" by the tlb importer.
What error do you get?

RBygrave
Posts: 24
Joined: Mon Jan 14, 2008 8:36 pm

Re: sfFTPLib.FTPItems

Post by RBygrave » Fri Mar 22, 2013 3:34 pm

Figured it out there are item and items
 
 
sfFTPLib.FTPItems items;
items = _ftp.ReadDirectory();
 
foreach (sfFTPLib.FTPItem i in items)
{
  if (i.Type == enumItemType.ftpItemTypeRegular)
    {
    if (util.WildcardMatch((string)i.Name, FileMask, true))
      {
      al.Add((string)i.Name);
      }
    }
}
Last edited by RBygrave on Fri Mar 22, 2013 3:34 pm, edited 1 time in total.

Post Reply