Zrythm v2.0.0-DEV
a highly automated and intuitive digital audio workstation
Loading...
Searching...
No Matches
IDirectoryManager Class Referenceabstract
Inheritance diagram for IDirectoryManager:

Public Types

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

virtual fs::path get_prefix () const =0
 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.
virtual fs::path get_user_dir (bool force_default)=0
 Gets the zrythm directory, either from the settings if non-empty, or the default ($XDG_DATA_DIR/zrythm).
virtual fs::path get_default_user_dir ()=0
 Returns the default user "zrythm" dir.
virtual fs::path get_dir (DirectoryType type)
 Returns a Zrythm directory specified by type.

Detailed Description

Definition at line 12 of file directory_manager.h.

Member Enumeration Documentation

◆ DirectoryType

Type of directory.

System* directories are directories that are determined during installation that contain immutable data.

User* directories are directories determined based on the user or the user's preferences that contain user-modifiable data.

Enumerator
SYSTEM_PREFIX 

The prefix, or in the case of windows installer the root dir (C/program files/zrythm), or in the case of macos installer the bundle path.

In all cases, "share" is expected to be found in this dir.

SYSTEM_BINDIR 

"bin" under SYSTEM_PREFIX.

SYSTEM_PARENT_DATADIR 

"share" under SYSTEM_PREFIX.

SYSTEM_PARENT_LIBDIR 

libdir name under SYSTEM_PREFIX.

SYSTEM_ZRYTHM_LIBDIR 

libdir/zrythm

SYSTEM_BUNDLED_PLUGINSDIR 

libdir/zrythm/lv2

SYSTEM_LOCALEDIR 

Localization under "share".

SYSTEM_ZRYTHM_DATADIR 

share/zrythm

SYSTEM_SAMPLESDIR 

Samples.

SYSTEM_SCRIPTSDIR 

Scripts.

SYSTEM_THEMESDIR 

Themes.

SYSTEM_THEMES_CSS_DIR 

CSS themes.

SYSTEM_THEMES_ICONS_DIR 

Icon themes.

SYSTEM_SPECIAL_LV2_PLUGINS_DIR 

Special external Zrythm plugins path (not part of the Zrythm source code).

Used for ZLFO and other plugins.

SYSTEM_TEMPLATES 

Project templates.

USER_TOP 

Main zrythm directory from gsettings.

USER_PROJECTS 

Subdirs of USER_TOP.

USER_THEMES_CSS 

User CSS themes.

USER_THEMES_ICONS 

User icon themes.

USER_SCRIPTS 

User scripts.

USER_LOG 

Log files.

USER_PROFILING 

Profiling files.

USER_GDB 

Gdb backtrace files.

USER_BACKTRACE 

Backtraces.

Definition at line 24 of file directory_manager.h.

Member Function Documentation

◆ get_default_user_dir()

virtual fs::path IDirectoryManager::get_default_user_dir ( )
pure virtual

Returns the default user "zrythm" dir.

This is used when resetting or when the dir is not selected by the user yet.

Implemented in DirectoryManager, and TestingDirectoryManager.

◆ get_dir()

virtual fs::path IDirectoryManager::get_dir ( DirectoryType type)
virtual

Returns a Zrythm directory specified by type.

Returns
A newly allocated string.

◆ get_prefix()

virtual fs::path IDirectoryManager::get_prefix ( ) const
pure virtual

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.

Returns
A newly allocated string.

Implemented in DirectoryManager, and TestingDirectoryManager.

◆ get_user_dir()

virtual fs::path IDirectoryManager::get_user_dir ( bool force_default)
pure virtual

Gets the zrythm directory, either from the settings if non-empty, or the default ($XDG_DATA_DIR/zrythm).

Parameters
force_defaultIgnore the settings and get the default dir.

Implemented in DirectoryManager, and TestingDirectoryManager.


The documentation for this class was generated from the following file: