Exemplo n.º 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);
     }
 }
Exemplo n.º 2
0
 private function exec_enabled()
 {
     $this->loadCore();
     return isExecEnabled();
 }
Exemplo n.º 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);
    }
}