/** * Enumerate content files and directories * * @return void */ public function enumerate() { // Set progress Ai1wm_Status::set(array('type' => 'info', 'message' => __('Retrieving a list of all WordPress files...', AI1WM_PLUGIN_NAME))); // Open the archive file for reading $archive = new Ai1wm_Extractor($this->storage()->archive()); // Unpack package.json and database.sql files $total = $archive->get_number_of_files(); // Substract database.sql and package.json $total -= 2; // close the archive file $archive->close(); // Set progress Ai1wm_Status::set(array('total' => $total, 'type' => 'info', 'message' => __('Done retrieving a list of all WordPress files.', AI1WM_PLUGIN_NAME))); // Redirect $this->route_to('truncate'); }
/** * Enumerate content files and directories * * @return void */ public function enumerate() { // Set progress Ai1wm_Status::set(array('type' => 'info', 'message' => __('Retrieving a list of all WordPress files...', AI1WM_PLUGIN_NAME))); // Open the archive file for reading $archive = new Ai1wm_Extractor($this->storage()->archive()); // Get number of files $total = $archive->get_number_of_files(); // Close the archive file $archive->close(); // Set total $this->args['total'] = $total; // Set progress Ai1wm_Status::set(array('type' => 'info', 'message' => __('Done retrieving a list of all WordPress files.', AI1WM_PLUGIN_NAME))); // Redirect $this->route_to('truncate'); }