/** * Deletes config file * @return bool * @throws \T4\Core\Exception|\T4\Fs\Exception */ public function delete() { if (empty($this->__path)) { throw new Exception('Empty path for config delete'); } return Helpers::removeFile($this->__path); }
public function deleteImage($item) { if ($item->image) { try { Helpers::removeFile(ROOT_PATH_PUBLIC . $item->image); } catch (\T4\Fs\Exception $e) { return false; } } return true; }
public function deleteImage($path) { if ($this->image) { try { $this->image = ''; Helpers::removeFile(ROOT_PATH_PUBLIC . $path); } catch (\T4\Fs\Exception $e) { return false; } } return true; }