ReadJSONFile()
On this page
ReadJSONFile(path: String, default_value: Variant = null) -> VariantRead and parse a JSON file.
Returns: Parsed data or fallback.
ReadJSONFile("user://settings.json", {"music": 0.7})Empty/invalid input and parsed JSON null select fallback. For distinguishing valid null, use a JSON parser explicitly.
WriteJSONFile()#
WriteJSONFile(path: String, value: Variant, indent: String = "\t") -> boolSerialize and overwrite a user-data JSON file.
Returns: Boolean success.
WriteJSONFile("user://settings.json", {"music": 0.5}, " ")FileExists()#
FileExists(path: String) -> boolCheck whether a file exists.
Returns: Boolean.
FileExists("user://settings.json")DirectoryExists()#
DirectoryExists(path: String) -> boolCheck whether a directory exists after path globalization.
Returns: Boolean.
DirectoryExists("user://tutorial")