libretro.drivers.path.temp¶
Types and classes for creating temporary directories for the core to use.
Classes
A path driver that creates temporary directories for the core to use. |
- class TempDirPathDriver[source]¶
Bases:
PathDriverA path driver that creates temporary directories for the core to use.
Test cases should add required files to these directories before running the core.
- __init__(corepath=None, prefix=b'libretro.py-', ignore_cleanup_errors=True)[source]¶
Initialize a new
TempDirPathDriverand creates the necessary directories.- 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.
prefix (
str|bytes) – A prefix that will be applied to the temporary directory’s name. Can be astrorbytes.
- Raises:
TypeError – If any of the arguments are not of the specified types.
- classmethod __new__(*args, **kwargs)¶
- property root_dir¶
Path to the root directory created by this driver.
- 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.