libretro.drivers.path.explicit¶
PathDriver implementation whose paths are supplied explicitly at construction.
See also
PathDriverThe protocol this driver implements.
Classes
A path driver that supports defining individual locations for each directory. |
- class ExplicitPathDriver[source]¶
Bases:
PathDriverA path driver that supports defining individual locations for each directory.
- __init__(corepath=None, system=None, assets=None, save=None, playlist=None, file_browser_start=None)[source]¶
Initialize a new
ExplicitPathDriver, creating the specified directories if necessary.- Parameters:
corepath (
str|bytes|PathLike[str] |PathLike[bytes] |Core|None) –May be one of the following:
str,bytes,PathLikePath to the libretro core. Will be encoded into UTF-8 if necessary and exposed to the core with
RETRO_ENVIRONMENT_GET_LIBRETRO_PATH. Not validated for existence, permissions, or correctness; i.e. this may have a different value than the loaded core’s path, but you shouldn’t do this unless you’re specifically interested in testing this scenario.CoreIts
pathwill be used as the libretro core path. The driver won’t keep a reference to the core itself.NoneRETRO_ENVIRONMENT_GET_LIBRETRO_PATHwill be unavailable to cores.
system (
str|bytes|PathLike[str] |PathLike[bytes] |None) – The system directory that the core can access. Can be astr,bytes, orPathLike. IfNone,RETRO_ENVIRONMENT_GET_SYSTEM_DIRECTORYwill not be available to the core.assets (
str|bytes|PathLike[str] |PathLike[bytes] |None) – The directory containing assets for the core. Can be astr,bytes, orPathLike. IfNone,RETRO_ENVIRONMENT_GET_CORE_ASSETS_DIRECTORYwill not be available to the core.save (
str|bytes|PathLike[str] |PathLike[bytes] |None) – The directory where the core can save data. Can be astr,bytes, orPathLike. IfNone,RETRO_ENVIRONMENT_GET_SAVE_DIRECTORYwill not be available to the core.playlist (
str|bytes|PathLike[str] |PathLike[bytes] |None) – The directory where the core can read playlists. Can be astr,bytes, orPathLike. IfNone,RETRO_ENVIRONMENT_GET_PLAYLIST_DIRECTORYwill not be available to the core.file_browser_start (
str|bytes|PathLike[str] |PathLike[bytes] |None) – The directory that a frontend’s file browser would start in. Can be astr,bytes, orPathLike. IfNone,RETRO_ENVIRONMENT_GET_FILE_BROWSER_START_DIRECTORYwill not be available to the core.
- Raises:
TypeError – If any of the arguments are not of the correct type.
- classmethod __new__(*args, **kwargs)¶
- property system_dir¶
Corresponds to
EnvironmentCall.GET_SYSTEM_DIRECTORY.If
None, a core’s call toRETRO_ENVIRONMENT_GET_SYSTEM_DIRECTORYshould returnfalse.
- property libretro_path¶
Corresponds to
EnvironmentCall.GET_LIBRETRO_PATH.If
None, a core’s call toRETRO_ENVIRONMENT_GET_LIBRETRO_PATHshould returnfalse.
- property core_assets_dir¶
Corresponds to
EnvironmentCall.GET_CORE_ASSETS_DIRECTORY.If
None, a core’s call toRETRO_ENVIRONMENT_GET_CORE_ASSETS_DIRECTORYshould returnfalse.
- property save_dir¶
Corresponds to
EnvironmentCall.GET_SAVE_DIRECTORY.If
None, a core’s call toRETRO_ENVIRONMENT_GET_SAVE_DIRECTORYshould returnfalse.
- property playlist_dir¶
Corresponds to
EnvironmentCall.GET_PLAYLIST_DIRECTORY.If
None, a core’s call toRETRO_ENVIRONMENT_GET_PLAYLIST_DIRECTORYshould returnfalse.
- property file_browser_start_dir¶
Corresponds to
EnvironmentCall.GET_FILE_BROWSER_START_DIRECTORY.If
None, a core’s call toRETRO_ENVIRONMENT_GET_FILE_BROWSER_START_DIRECTORYshould returnfalse.