示例#1
0
 public void Delete(String remotePath)
 {
     try
     {
         Client.RemoveFile(remotePath);
     }
     catch { }
 }
示例#2
0
        private void CleanupGallery(AssortmentHelper helper, catalog_product_entity entity, IEnumerable <catalog_product_entity_media_gallery> currentImages, List <string> currentPaths, TElSimpleSFTPClient client, string basePath)
        {
            var toDelete = (from r in currentImages
                            where !currentPaths.Contains(r.value)
                            select basePath + r.value);


            foreach (var file in toDelete)
            {
                try
                {
                    client.RemoveFile(file);
                }
                catch { }
            }
            helper.DeleteGalleryItems(
                (from r in currentImages
                 where !currentPaths.Contains(r.value)
                 select r).ToList()
                );
        }