{"record":{"id":"0775ecc326690473","repo":"Intervention/image","slug":"file-basename-contained-in-splfileinfo-was-not","errorCode":null,"errorMessage":"File \"{basename}\" contained in SplFileInfo was not found in directory \"{dirname}\"","messagePattern":"File \"(.+?)\" contained in SplFileInfo was not found in directory \"(.+?)\"","errorType":"exception","errorClass":"Intervention\\Image\\Exceptions\\FileNotFoundException","httpStatus":null,"severity":"error","filePath":"src/Traits/CanParseFilePath.php","lineNumber":101,"sourceCode":"     */\n    protected static function filePathFromSplFileInfoOrFail(SplFileInfo $splFileInfo): string\n    {\n        $path = $splFileInfo->getPathname();\n        $dirname = pathinfo($path, PATHINFO_DIRNAME);\n        $basename = pathinfo($path, PATHINFO_BASENAME);\n\n        if ($path === '') {\n            throw new InvalidArgumentException('Path contained in SplFileInfo must not be an empty string');\n        }\n\n        if (!is_dir($dirname)) {\n            throw new DirectoryNotFoundException(\n                'The directory \"' . $dirname . '\" contained in SplFileInfo does not exist',\n            );\n        }\n\n        if (!file_exists($path)) {\n            throw new FileNotFoundException(\n                'File \"' . $basename . '\" contained in SplFileInfo was not found in directory \"' . $dirname . '\"',\n            );\n        }\n\n        if (!is_file($path)) {\n            throw new FileNotFoundException(\n                'File \"' . $basename . '\" contained in SplFileInfo is no file in directory \"' . $dirname . '\"',\n            );\n        }\n\n        if (!is_readable($dirname)) {\n            throw new FileNotReadableException(\n                'Directory \"' . $dirname . '\" contained in SplFileInfo is not readable',\n            );\n        }\n\n        if (!is_readable($path)) {\n            throw new FileNotReadableException(","sourceCodeStart":83,"sourceCodeEnd":119,"githubUrl":"https://github.com/Intervention/image/blob/5598b9e39751c34afc5cdee84abef77f92c26f68/src/Traits/CanParseFilePath.php#L83-L119","documentation":"Error \"File \"{basename}\" contained in SplFileInfo was not found in directory \"{dirname}\"\" thrown in Intervention/image.","triggerScenarios":"Thrown at src/Traits/CanParseFilePath.php:101 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Check SplFileInfo::isFile()/file_exists() before passing the object to the decoder","Verify the path was not moved or deleted between constructing the SplFileInfo and reading it","Use realpath or absolute paths to avoid relative-path resolution surprises"],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"5598b9e39751c34afc5cdee84abef77f92c26f68","analyzedAt":"2026-08-23T02:17:31.068Z","schemaVersion":2},"datasetVersion":"2026-08-23T08:06:27.607Z"}