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); } }
private function exec_enabled() { $this->loadCore(); return isExecEnabled(); }
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); } }