|
Zrythm v2.0.0-DEV
a highly automated and intuitive digital audio workstation
|
This can just be created on the stack as needed since it uses globally available information. More...
#include <src/utils/directory_manager.h>


Public Types | |
| using | UserDirProvider = std::function<fs::path ()> |
| using | DefaultUserDirProvider = std::function<fs::path ()> |
| using | ApplicationDirPathProvider = std::function<fs::path ()> |
| Public Types inherited from IDirectoryManager | |
| enum class | DirectoryType { SYSTEM_PREFIX , SYSTEM_BINDIR , SYSTEM_PARENT_DATADIR , SYSTEM_PARENT_LIBDIR , SYSTEM_ZRYTHM_LIBDIR , SYSTEM_BUNDLED_PLUGINSDIR , SYSTEM_LOCALEDIR , SYSTEM_ZRYTHM_DATADIR , SYSTEM_SAMPLESDIR , SYSTEM_SCRIPTSDIR , SYSTEM_THEMESDIR , SYSTEM_THEMES_CSS_DIR , SYSTEM_THEMES_ICONS_DIR , SYSTEM_SPECIAL_LV2_PLUGINS_DIR , SYSTEM_TEMPLATES , USER_TOP , USER_PROJECTS , USER_TEMPLATES , USER_THEMES , USER_THEMES_CSS , USER_THEMES_ICONS , USER_SCRIPTS , USER_LOG , USER_PROFILING , USER_GDB , USER_BACKTRACE } |
| Type of directory. More... | |
Public Member Functions | |
| DirectoryManager (UserDirProvider user_dir_provider, DefaultUserDirProvider default_user_dir_provider, ApplicationDirPathProvider application_dir_path_provider) | |
| fs::path | get_prefix () const override |
| Returns the prefix or in the case of Windows the root dir (C/program files/zrythm) or in the case of macos the bundle path. | |
| fs::path | get_user_dir (bool force_default) override |
| Gets the zrythm directory, either from the settings if non-empty, or the default ($XDG_DATA_DIR/zrythm). | |
| fs::path | get_default_user_dir () override |
| Returns the default user "zrythm" dir. | |
| Public Member Functions inherited from IDirectoryManager | |
| virtual fs::path | get_dir (DirectoryType type) |
| Returns a Zrythm directory specified by type. | |
This can just be created on the stack as needed since it uses globally available information.
Definition at line 155 of file directory_manager.h.
| using DirectoryManager::ApplicationDirPathProvider = std::function<fs::path ()> |
Definition at line 160 of file directory_manager.h.
| using DirectoryManager::DefaultUserDirProvider = std::function<fs::path ()> |
Definition at line 159 of file directory_manager.h.
| using DirectoryManager::UserDirProvider = std::function<fs::path ()> |
Definition at line 158 of file directory_manager.h.
|
inline |
Definition at line 163 of file directory_manager.h.
|
overridevirtual |
Returns the default user "zrythm" dir.
This is used when resetting or when the dir is not selected by the user yet.
Implements IDirectoryManager.
|
overridevirtual |
Returns the prefix or in the case of Windows the root dir (C/program files/zrythm) or in the case of macos the bundle path.
In all cases, "share" is expected to be found in this dir.
Implements IDirectoryManager.
|
overridevirtual |
Gets the zrythm directory, either from the settings if non-empty, or the default ($XDG_DATA_DIR/zrythm).
| force_default | Ignore the settings and get the default dir. |
Implements IDirectoryManager.