applocation¶
The openlp.core.common.applocation
module provides an utility for OpenLP receiving the data path etc.
-
class
openlp.core.common.applocation.
AppLocation
[source]¶ Bases:
object
The
AppLocation
class is a static class which retrieves a directory based on the directory type.-
AppDir
= 1¶
-
BaseDir
= None¶
-
CacheDir
= 5¶
-
DataDir
= 2¶
-
LanguageDir
= 6¶
-
PluginsDir
= 3¶
-
VersionDir
= 4¶
-
static
get_directory
(dir_type=1)[source]¶ Return the appropriate directory according to the directory type.
Parameters: dir_type – The directory type you want, for instance the data directory. Default AppLocation.AppDir
-
static
get_files
(section=None, extension=None)[source]¶ Get a list of files from the data files path.
Parameters: - section – Defaults to None. The section of code getting the files - used to load from a section’s data subdirectory.
- extension –
Defaults to None. The extension to search for. For example:
'.png'
-