{"record":{"id":"d04a12ca802fe6f3","repo":"EllanJiang/GameFramework","slug":"full-path-is-invalid-filesystemmanager","errorCode":null,"errorMessage":"Full path is invalid.","messagePattern":"Full path is invalid\\.","errorType":"exception","errorClass":"GameFrameworkException","httpStatus":null,"severity":"error","filePath":"GameFramework/FileSystem/FileSystemManager.cs","lineNumber":102,"sourceCode":"        {\n            if (fileSystemHelper == null)\n            {\n                throw new GameFrameworkException(\"File system helper is invalid.\");\n            }\n\n            m_FileSystemHelper = fileSystemHelper;\n        }\n\n        /// <summary>\n        /// 检查是否存在文件系统。\n        /// </summary>\n        /// <param name=\"fullPath\">要检查的文件系统的完整路径。</param>\n        /// <returns>是否存在文件系统。</returns>\n        public bool HasFileSystem(string fullPath)\n        {\n            if (string.IsNullOrEmpty(fullPath))\n            {\n                throw new GameFrameworkException(\"Full path is invalid.\");\n            }\n\n            return m_FileSystems.ContainsKey(Utility.Path.GetRegularPath(fullPath));\n        }\n\n        /// <summary>\n        /// 获取文件系统。\n        /// </summary>\n        /// <param name=\"fullPath\">要获取的文件系统的完整路径。</param>\n        /// <returns>获取的文件系统。</returns>\n        public IFileSystem GetFileSystem(string fullPath)\n        {\n            if (string.IsNullOrEmpty(fullPath))\n            {\n                throw new GameFrameworkException(\"Full path is invalid.\");\n            }\n\n            FileSystem fileSystem = null;","sourceCodeStart":84,"sourceCodeEnd":120,"githubUrl":"https://github.com/EllanJiang/GameFramework/blob/d0c010b05167c58e92350449d04864a91ca13fd2/GameFramework/FileSystem/FileSystemManager.cs#L84-L120","documentation":"FileSystemManager.HasFileSystem looks up the file system registry keyed by a regularized full path. A null or empty fullPath cannot be a valid key, so the manager throws 'Full path is invalid.' before the lookup.","triggerScenarios":"Calling FileSystemManager.HasFileSystem(null) or HasFileSystem(\"\").","commonSituations":"A path built from missing config values, an unset scene/level path, or string concatenation yielding an empty result before the existence check.","solutions":["Validate fullPath is non-null and non-empty before calling HasFileSystem.","Fix the config or code path that produced the empty full path.","Normalize the path with Utility.Path.GetRegularPath if building it manually."],"exampleFix":"// before\nbool exists = fileSystemManager.HasFileSystem(fullPath); // may be empty\n// after\nif (!string.IsNullOrEmpty(fullPath))\n    bool exists = fileSystemManager.HasFileSystem(fullPath);","handlingStrategy":"validation","validationCode":"if (string.IsNullOrEmpty(fullPath))\n    throw new ArgumentException(\"Full path must be non-empty.\", nameof(fullPath));","typeGuard":"static bool IsValidFullPath(string fullPath) => !string.IsNullOrEmpty(fullPath);","tryCatchPattern":"try { return fileSystemManager.HasFileSystem(fullPath); }\ncatch (GameFrameworkException ex) when (ex.Message == \"Full path is invalid.\") { return false; /* treat as absent after logging */ }","preventionTips":["Resolve all file system paths from one config/persistent-path helper that guarantees non-empty output.","Normalize paths with Utility.Path.GetRegularPath before use.","Fail at configuration load time if a required path key is missing."],"tags":["filesystem","validation","path-validation","null-argument"],"backgroundTag":"missing-required-argument","analyzedSha":"d0c010b05167c58e92350449d04864a91ca13fd2","analyzedAt":"2026-09-15T13:37:15.352Z","contentChangedAt":"2026-09-15T13:37:15.352Z","schemaVersion":2},"datasetVersion":"2026-09-16T04:17:20.429Z"}