public static function create_experiment_folder_path() { do { ExperimentUtilities::$experimentPath = Config::get('pga_config.airavata')['experiment-data-absolute-path'] . "/" . Session::get('username') . "/" . md5(rand() * time()) . '/'; } while (is_dir(ExperimentUtilities::$experimentPath)); // if dir already exists, try again // create upload directory if (!mkdir(ExperimentUtilities::$experimentPath, 0755, true)) { CommonUtilities::print_error_message('<p>Error creating upload directory! Please try again later or report a bug using the link in the Help menu.</p>'); $experimentAssemblySuccessful = false; } }