protected function createNamedSubDirectory(core_kernel_file_File $rootDirectory, $activity) { $name = md5($activity->getUri()); $relPath = $rootDirectory->getRelativePath() . DIRECTORY_SEPARATOR . $name; $absPath = $rootDirectory->getAbsolutePath() . DIRECTORY_SEPARATOR . $name; if (!is_dir($absPath) && !mkdir($absPath)) { throw new taoItems_models_classes_CompilationFailedException("Could not create sub-directory '{$absPath}'."); } return $rootDirectory->getFileSystem()->createFile('', $relPath); }