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


PHP fulldelete函数代码示例

本文整理汇总了PHP中fulldelete函数的典型用法代码示例。如果您正苦于以下问题:PHP fulldelete函数的具体用法?PHP fulldelete怎么用?PHP fulldelete使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


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

示例1: tearDown

 public function tearDown()
 {
     global $CFG;
     if (empty($CFG->keeptempdirectoriesonbackup)) {
         fulldelete("{$CFG->dataroot}/temp/backup/{$this->tempdir}");
     }
 }
开发者ID:sebastiansanio,项目名称:tallerdeprogramacion2fiuba,代码行数:7,代码来源:testlib.php

示例2: importpostprocess

 /**
  * Does any post-processing that may be desired
  * Clean the temporary directory if a zip file was imported
  * @return bool success
  */
 public function importpostprocess()
 {
     if ($this->tempdir != '') {
         fulldelete($this->tempdir);
     }
     return true;
 }
开发者ID:sumitnegi933,项目名称:Moodle_lms_New,代码行数:12,代码来源:formatbase.php

示例3: theme_reset_all_caches

/**
 * Invalidate all server and client side caches.
 * @return void
 */
function theme_reset_all_caches() {
    global $CFG;
    require_once("$CFG->libdir/filelib.php");

    set_config('themerev', empty($CFG->themerev) ? 1 : $CFG->themerev+1);
    fulldelete("$CFG->dataroot/cache/theme");
}
开发者ID:nikita777,项目名称:moodle,代码行数:11,代码来源:outputlib.php

示例4: webquest_upgrade

function webquest_upgrade($oldversion)
{
    /// This function does anything necessary to upgrade
    /// older versions to match current functionality
    $status = true;
    global $CFG;
    if ($oldversion < 2007081222) {
        require_once $CFG->dirroot . '/backup/lib.php';
        //make the change into each course
        $courses = get_records("course");
        foreach ($courses as $course) {
            $newdir = "{$course->id}/{$CFG->moddata}/webquest";
            if (make_upload_directory($newdir)) {
                $olddir = "{$CFG->dataroot}/{$course->id}/{$CFG->moddata}/webquest/submissions";
                //chec k if the old directory exists
                if (is_dir($olddir)) {
                    $status = backup_copy_file($olddir, $CFG->dataroot . "/" . $newdir);
                }
                if ($status) {
                    fulldelete($olddir);
                }
            }
        }
    }
    return $status;
}
开发者ID:hmatulis,项目名称:RTL-BIDI-Hebrew-Moodle-Plugins,代码行数:26,代码来源:mysql.php

示例5: tearDown

 protected function tearDown()
 {
     global $CFG;
     if (empty($CFG->keeptempdirectoriesonbackup)) {
         fulldelete("{$CFG->tempdir}/backup/{$this->tempdir}");
     }
 }
开发者ID:JP-Git,项目名称:moodle,代码行数:7,代码来源:lib_test.php

示例6: delete_certificate_files

function delete_certificate_files($certificate = '')
{
    global $CFG;
    require_once $CFG->libdir . '/filelib.php';
    $dir = $CFG->dataroot . '/' . $certificate->course . '/' . $CFG->moddata . '/certificate/' . $certificate->id . '/' . $user->id;
    if ($certificateid) {
        $dir .= '/' . $certificateid;
    }
    return fulldelete($dir);
}
开发者ID:hmatulis,项目名称:RTL-BIDI-Hebrew-Moodle-Plugins,代码行数:10,代码来源:lib.php

示例7: theme_reset_all_caches

/**
 * Invalidate all server and client side caches.
 *
 * This method deletes the physical directory that is used to cache the theme
 * files used for serving.
 * Because it deletes the main theme cache directory all themes are reset by
 * this function.
 */
function theme_reset_all_caches()
{
    global $CFG;
    require_once "{$CFG->libdir}/filelib.php";
    $next = time();
    if (isset($CFG->themerev) and $next <= $CFG->themerev and $CFG->themerev - $next < 60 * 60) {
        // This resolves problems when reset is requested repeatedly within 1s,
        // the < 1h condition prevents accidental switching to future dates
        // because we might not recover from it.
        $next = $CFG->themerev + 1;
    }
    set_config('themerev', $next);
    // time is unique even when you reset/switch database
    fulldelete("{$CFG->cachedir}/theme");
}
开发者ID:nicusX,项目名称:moodle,代码行数:23,代码来源:outputlib.php

示例8: webquest_delete_instance

function webquest_delete_instance($id)
{
    /// Given an ID of an instance of this module,
    /// delete the instance and any data that depends on it.
    global $CFG;
    if (!($webquest = get_record("webquest", "id", "{$id}"))) {
        return false;
    }
    $result = true;
    if (!delete_records("webquest", "id", "{$webquest->id}")) {
        $result = false;
    }
    if (!delete_records("webquest_resources", "webquestid", "{$webquest->id}")) {
        $result = false;
    }
    if (!delete_records("webquest_tasks", "webquestid", "{$webquest->id}")) {
        $result = false;
    }
    if (!delete_records("webquest_rubrics", "webquestid", "{$webquest->id}")) {
        $result = false;
    }
    if (!delete_records("webquest_grades", "webquestid", "{$webquest->id}")) {
        $result = false;
    }
    if (!delete_records("webquest_teams", "webquestid", "{$webquest->id}")) {
        $result = false;
    }
    if (!delete_records("webquest_team_members", "webquestid", "{$webquest->id}")) {
        $result = false;
    }
    if ($submissions = get_records("webquest_submissions", "webquestid", "{$webquest->id}")) {
        foreach ($submissions as $submission) {
            $dirpath = "{$CFG->dataroot}/{$webquest->course}/{$CFG->moddata}/webquest/{$submission->id}";
            fulldelete($dirpath);
        }
    }
    if (!delete_records("webquest_submissions", "webquestid", "{$webquest->id}")) {
        $result = false;
    }
    return $result;
}
开发者ID:kai707,项目名称:ITSA-backup,代码行数:41,代码来源:lib.php

示例9: execute

 public function execute()
 {
     global $CFG, $DB;
     if ($this->expandedOptions['flush']) {
         if (isset($CFG->trashdir)) {
             $trashdir = $CFG->trashdir;
         } else {
             $trashdir = $CFG->dataroot . '/trashdir';
         }
         require_once $CFG->libdir . '/filelib.php';
         fulldelete($trashdir);
         exit(0);
     }
     if ($this->expandedOptions['stdin']) {
         while ($line = fgets(STDIN)) {
             $this->fileDelete($line);
         }
     } else {
         foreach ($this->arguments as $argument) {
             $this->fileDelete($argument);
         }
     }
 }
开发者ID:dariogs,项目名称:moosh,代码行数:23,代码来源:FileDelete.php

示例10: delete_instance

 /**
  * Deletes an assignment activity
  *
  * Deletes all database records, files and calendar events for this assignment.
  * @param $assignment object The assignment to be deleted
  * @return boolean False indicates error
  */
 function delete_instance($assignment)
 {
     global $CFG;
     $assignment->courseid = $assignment->course;
     $result = true;
     if (!delete_records('assignment_submissions', 'assignment', $assignment->id)) {
         $result = false;
     }
     if (!delete_records('assignment', 'id', $assignment->id)) {
         $result = false;
     }
     if (!delete_records('event', 'modulename', 'assignment', 'instance', $assignment->id)) {
         $result = false;
     }
     // delete file area with all attachments - ignore errors
     require_once $CFG->libdir . '/filelib.php';
     fulldelete($CFG->dataroot . '/' . $assignment->course . '/' . $CFG->moddata . '/assignment/' . $assignment->id);
     assignment_grade_item_delete($assignment);
     return $result;
 }
开发者ID:BackupTheBerlios,项目名称:samouk-svn,代码行数:27,代码来源:lib.php

示例11: foreach

// restored copy of the module
$newcmid = null;
$tasks = $rc->get_plan()->get_tasks();
foreach ($tasks as $task) {
    if (is_subclass_of($task, 'restore_activity_task')) {
        if ($task->get_old_contextid() == $cmcontext->id) {
            $newcmid = $task->get_moduleid();
            break;
        }
    }
}
// if we know the cmid of the new course module, let us move it
// right below the original one. otherwise it will stay at the
// end of the section
if ($newcmid) {
    $newcm = get_coursemodule_from_id('', $newcmid, $course->id, true, MUST_EXIST);
    moveto_module($newcm, $section, $cm);
    moveto_module($cm, $section, $newcm);
}
$rc->destroy();
if (empty($CFG->keeptempdirectoriesonbackup)) {
    fulldelete($backupbasepath);
}
echo $output->header();
if ($newcmid) {
    echo $output->confirm(get_string('duplicatesuccess', 'core', $a), new single_button(new moodle_url('/course/modedit.php', array('update' => $newcmid, 'sr' => $sectionreturn)), get_string('duplicatecontedit'), 'get'), new single_button(course_get_url($course, $cm->sectionnum, array('sr' => $sectionreturn)), get_string('duplicatecontcourse'), 'get'));
} else {
    echo $output->notification(get_string('duplicatesuccess', 'core', $a), 'notifysuccess');
    echo $output->continue_button(course_get_url($course, $cm->sectionnum, array('sr' => $sectionreturn)));
}
echo $output->footer();
开发者ID:saurabh947,项目名称:MoodleLearning,代码行数:31,代码来源:modduplicate.php

示例12: html_footer

         echo "<form action=\"coursefiles.php\" method=\"get\">\n";
         echo " <input type=\"hidden\" name=\"id\" value=\"{$id}\" />\n";
         echo " <input type=\"hidden\" name=\"wdir\" value=\"{$wdir}\" />\n";
         echo " <input type=\"hidden\" name=\"action\" value=\"cancel\" />\n";
         echo " <input type=\"submit\" value=\"{$strcancel}\" />\n";
         echo "</form>\n";
         echo "</td>\n</tr>\n</table>\n";
     }
     html_footer();
     break;
 case "delete":
     if ($confirm and confirm_sesskey()) {
         html_header($course, $wdir);
         foreach ($USER->filelist as $file) {
             $fullfile = $basedir . $file;
             if (!fulldelete($fullfile)) {
                 echo "<br />Error: Could not delete: {$fullfile}";
             }
         }
         clearfilelist();
         displaydir($wdir);
         html_footer();
     } else {
         html_header($course, $wdir);
         if (setfilelist($_POST)) {
             echo "<p align=center>" . get_string("deletecheckwarning") . ":</p>";
             print_simple_box_start("center");
             printfilelist($USER->filelist);
             print_simple_box_end();
             echo "<br />";
             $frameold = $CFG->framename;
开发者ID:r007,项目名称:PMoodle,代码行数:31,代码来源:coursefiles.php

示例13: cleanup

 public function cleanup() {
     return fulldelete($this->directory);
 }
开发者ID:nottmoo,项目名称:moodle,代码行数:3,代码来源:lib.php

示例14: process

 /**
  * Processes this restore stage
  * @return bool
  * @throws restore_ui_exception
  */
 public function process()
 {
     global $CFG;
     if ($this->filename) {
         $archivepath = $CFG->tempdir . '/backup/' . $this->filename;
         if (!file_exists($archivepath)) {
             throw new restore_ui_exception('invalidrestorefile');
         }
         $outcome = $this->extract_file_to_dir($archivepath);
         if ($outcome) {
             fulldelete($archivepath);
         }
     } else {
         $fs = get_file_storage();
         $storedfile = $fs->get_file_by_hash($this->pathnamehash);
         if (!$storedfile || $storedfile->get_contenthash() !== $this->contenthash) {
             throw new restore_ui_exception('invalidrestorefile');
         }
         $outcome = $this->extract_file_to_dir($storedfile);
     }
     return $outcome;
 }
开发者ID:educakanchay,项目名称:campus,代码行数:27,代码来源:restore_ui_stage.class.php

示例15: js_reset_all_caches

/**
 * Invalidate all server and client side JS caches.
 * @return void
 */
function js_reset_all_caches()
{
    global $CFG;
    require_once "{$CFG->libdir}/filelib.php";
    set_config('jsrev', empty($CFG->jsrev) ? 1 : $CFG->jsrev + 1);
    fulldelete("{$CFG->dataroot}/cache/js");
}
开发者ID:richheath,项目名称:moodle,代码行数:11,代码来源:outputrequirementslib.php


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