public function make_dump2($type, $path) { try { if (method_exists($this->connector, 'dump_structure')) { if (!$path) { $path = DUMP_PATH; } if (!$this->name) { throw new Exception("No table detected"); } switch ($type) { case 1: file_system::write_to_file($path . $this->name . '.strc.sql', $this->connector->dump_structure()); break; case 2: $this->connector->dump_data($path . $this->name . '.data.sql'); break; case 3: file_system::write_to_file($path . $this->name . '.strc.sql', $this->connector->dump_structure()); $this->connector->dump_data($path . $this->name . '.data.sql'); break; } } else { throw new Exception("Connector has no dumper"); } } catch (Exception $e) { } }
/** * Удалить файл[ы] * @access protected */ protected function sys_unset() { $this->_flush(); $files = $this->_get(); $this->_flush(); $data = $this->extjs_unset_json(false); if (!empty($files)) { foreach ($files as $file) { file_system::remove_file($file->real_name); } } response::send($data, 'json'); }