{"record":{"id":"f4cb6c17d6f968b1","repo":"octobercms/october","slug":"system-lang-directory-create-fail","errorCode":null,"errorMessage":"system::lang.directory.create_fail","messagePattern":"system::lang\\.directory\\.create_fail","errorType":"exception","errorClass":"SystemException","httpStatus":null,"severity":"error","filePath":"modules/cms/classes/CodeParser.php","lineNumber":377,"sourceCode":"            if (function_exists('opcache_invalidate') && ini_get('opcache.enable')) {\n                opcache_invalidate($path, true);\n            }\n            elseif (function_exists('apc_compile_file')) {\n                apc_compile_file($path);\n            }\n        }\n    }\n\n    /**\n     * makeDirectorySafe makes a directory with concurrency support\n     */\n    protected function makeDirectorySafe($dir)\n    {\n        $count = 0;\n\n        if (is_dir($dir)) {\n            if (!is_writable($dir)) {\n                throw new SystemException(Lang::get('system::lang.directory.create_fail', ['name'=>$dir]));\n            }\n\n            return;\n        }\n\n        while (!is_dir($dir) && !@mkdir($dir, 0755, true)) {\n            usleep(rand(50000, 200000));\n\n            if ($count++ > 10) {\n                throw new SystemException(Lang::get('system::lang.directory.create_fail', ['name'=>$dir]));\n            }\n        }\n\n        File::chmodRecursive($dir);\n    }\n}\n","sourceCodeStart":359,"sourceCodeEnd":394,"githubUrl":"https://github.com/octobercms/october/blob/b608633a7e8922487d91a8161499020121c3b3bf/modules/cms/classes/CodeParser.php#L359-L394","documentation":"Error \"system::lang.directory.create_fail\" thrown in octobercms/october.","triggerScenarios":"Thrown at modules/cms/classes/CodeParser.php:377 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"b608633a7e8922487d91a8161499020121c3b3bf","analyzedAt":"2026-08-21T04:24:57.515Z","schemaVersion":2},"datasetVersion":"2026-08-21T11:28:35.574Z"}