Beispiel #1
0
 public function prepareFolders()
 {
     $file = $this->getTempFileName();
     if (isExecEnabled($file)) {
         exec('find "' . rtrim($this->root, DIRECTORY_SEPARATOR) . '" -type d -exec echo {}/ \\; > ' . $file);
     } else {
         file_put_contents($file, '');
         $this->readDirRecursive($this->root);
     }
 }
Beispiel #2
0
 private function exec_enabled()
 {
     $this->loadCore();
     return isExecEnabled();
 }
Beispiel #3
0
function cleanFolder($dir, $touch = false, $time = false)
{
    if (!is_dir($dir)) {
        return;
    }
    if (isExecEnabled()) {
        exec('find ' . $dir . ' -type f -delete', $output);
    }
    cleanNitroFiles($dir, $time);
    if (is_string($touch)) {
        touch(realpath($dir) . DS . $touch);
    }
}