Jump to content


Photo

sfFTPLib.FTPItems


  • Please log in to reply
2 replies to this topic

#1 Richard_B

Richard_B
  • Members
  • 24 posts

Posted 22 March 2013 - 03: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);

         }

     }

  }

 



#2 mb

mb

    Developer

  • Administrators
  • 11527 posts
  • Gender:
    Male
  • Location:
    Worldwide

Posted 22 March 2013 - 03: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?

#3 Richard_B

Richard_B
  • Members
  • 24 posts

Posted 22 March 2013 - 03: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);

      }

    }

}


Edited by Richard_B, 22 March 2013 - 03:34 PM.





0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users