public function testDelete() { $path = $this->getPath('delete.log'); $path2 = $path . '.2'; rex_file::put($path, ''); rex_file::put($path2, ''); rex_log_file::delete($path); $this->assertFileNotExists($path); $this->assertFileNotExists($path2); }
/** * Verwaltung der Content Sprachen. * * @package redaxo5 */ // -------------- Defaults $func = rex_request('func', 'string'); $error = ''; $success = ''; $logFile = rex_path::cache('system.log'); if ($func == 'delLog') { // close logger, to free remaining file-handles to syslog // so we can safely delete the file rex_logger::close(); if (rex_log_file::delete($logFile)) { $success = rex_i18n::msg('syslog_deleted'); } else { $error = rex_i18n::msg('syslog_delete_error'); } } $message = ''; $content = ''; if ($success != '') { $message .= rex_view::success($success); } if ($error != '') { $message .= rex_view::error($error); } $content .= ' <table class="table table-hover">