当前位置: 首页>>代码示例>>PHP>>正文


PHP Files::delete_folder方法代码示例

本文整理汇总了PHP中Files::delete_folder方法的典型用法代码示例。如果您正苦于以下问题:PHP Files::delete_folder方法的具体用法?PHP Files::delete_folder怎么用?PHP Files::delete_folder使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Files的用法示例。


在下文中一共展示了Files::delete_folder方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: delete_folder

 /**
  * Delete an empty folder
  */
 public function delete_folder()
 {
     // this is just a safeguard if they circumvent the JS permissions
     if (!in_array('delete_folder', Files::allowed_actions())) {
         show_error(lang('files:no_permissions'));
     }
     if ($id = $this->input->post('folder_id')) {
         $result = Files::delete_folder($id);
         $result['status'] and Events::trigger('file_folder_deleted', $id);
         echo json_encode($result);
     }
 }
开发者ID:blekedeg,项目名称:lbhpers,代码行数:15,代码来源:admin.php

示例2: delete_product

 /**
  * Deletes a product, the images and Files folder related to it.
  *
  * @param integer $id The Product ID to delete
  * @return boolean TRUE or FALSE on success of failure
  * @access public
  */
 public function delete_product($id)
 {
     $product = $this->get_product($id);
     if ($this->db->delete('firesale_products', array('id' => $id))) {
         // Remove files folder
         if ($product !== FALSE) {
             $folder = $this->get_file_folder_by_slug($product->slug);
             if ($folder != FALSE) {
                 $images = Files::folder_contents($folder->id);
                 $images = $images['data']['file'];
                 foreach ($images as $image) {
                     Files::delete_file($image->id);
                 }
                 Files::delete_folder($folder->id);
             }
         }
         return TRUE;
     } else {
         return FALSE;
     }
 }
开发者ID:rosellkarlrossj,项目名称:FireSALE,代码行数:28,代码来源:products_m.php

示例3: uninstall

 public function uninstall()
 {
     $this->load->driver('Streams');
     $this->load->library('files/files');
     // Delete the Uploads folder and remove its ID in the settings table
     Files::delete_folder(Settings::get($this->module_name . '_folder'));
     $this->db->delete('settings', array('module' => $this->module_name));
     // Remove Streams News
     $this->streams->utilities->remove_namespace($this->module_name);
     return true;
 }
开发者ID:numerogeek,项目名称:streams_import,代码行数:11,代码来源:details.php

示例4: uninstall

 public function uninstall()
 {
     // Load required items
     $this->load->driver('Streams');
     $this->load->model('firesale/categories_m');
     $this->load->model('firesale/products_m');
     $this->load->library('files/files');
     // Remove settings
     $this->settings('remove');
     // Remove email templates
     $this->templates('remove');
     // Remove products
     $this->products_m->delete_all_products();
     // Remove files folder
     $folder = $this->products_m->get_file_folder_by_slug('product-images');
     if ($folder != FALSE) {
         Files::delete_folder($folder->id);
     }
     // Remove streams
     $this->streams->utilities->remove_namespace('firesale_categories');
     $this->streams->utilities->remove_namespace('firesale_products');
     $this->streams->utilities->remove_namespace('firesale_gateways');
     $this->streams->utilities->remove_namespace('firesale_addresses');
     $this->streams->utilities->remove_namespace('firesale_orders');
     $this->streams->utilities->remove_namespace('firesale_orders_items');
     // Drop the payment gateway tables
     $this->dbforge->drop_table('firesale_products_firesale_categories');
     // Streams doesn't auto-remove it =/
     $this->dbforge->drop_table('firesale_gateway_settings');
     $this->dbforge->drop_table('firesale_order_items');
     $this->dbforge->drop_table('firesale_transactions');
     // Return
     return TRUE;
 }
开发者ID:rosellkarlrossj,项目名称:FireSALE,代码行数:34,代码来源:details.php

示例5: delete_folder

 /**
  * Delete an empty folder
  */
 public function delete_folder()
 {
     // this is just a safeguard if they circumvent the JS permissions
     if (!in_array('delete_folder', Files::allowed_actions())) {
         show_error(lang('files:no_permissions'));
     }
     if ($id = $this->input->post('folder_id')) {
         echo json_encode(Files::delete_folder($id));
     }
 }
开发者ID:gamchantoi,项目名称:sisfo-ft,代码行数:13,代码来源:admin.php


注:本文中的Files::delete_folder方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。