The base class for handling external resources. More...
Public Types | |
enum | SubDirectories { AudioFiles, Images, SampleMaps, UserPresets, Samples, Scripts , Presets, XMLPresetBackups, AdditionalSourceCode } |
The sub folders of each project folder. More... | |
Public Member Functions | |
void | createLinkFile (SubDirectories dir, const File &relocation) |
Creates a platform dependant file in the subdirectory that redirects to another location. More... | |
String | getFilePath (const String &pathToFile, SubDirectories subDir) const |
creates a absolute path from the pathToFile and the specified sub directory. More... | |
const String | getFileReference (const String &absoluteFileName, SubDirectories dir) const |
Creates a reference string that can be used to obtain the file in the project directory. More... | |
Public Member Functions inherited from ControlledObject | |
ControlledObject (MainController *m) | |
Creates a new ControlledObject. More... | |
const MainController * | getMainController () const noexcept |
Provides read-only access to the main controller. More... | |
MainController * | getMainController () noexcept |
Provides write access to the main controller. More... | |
Static Public Member Functions | |
static bool | isAbsolutePathCrossPlatform (const String &pathName) |
checks if this is a absolute path (including absolute win paths on OSX and absolute OSX paths on windows); | |
The base class for handling external resources.
HISE uses a strict root-folder based encapsulation for every project with dedicated sub folders for each file type.
In compiled plugins, these resources will either be embedded into the plugin, shipped as compressed data file along with the binary or use a customizable path for the sample data.
Regardless whether you use HISE with C++ only or develop your project with the HISE application, this system will be used for resolving external data references.
enum SubDirectories |
The sub folders of each project folder.
void createLinkFile | ( | SubDirectories | dir, |
const File & | relocation | ||
) |
Creates a platform dependant file in the subdirectory that redirects to another location.
This is mainly used for storing audio samples at another location to keep the project folder size small.
juce::String getFilePath | ( | const String & | pathToFile, |
SubDirectories | subDir | ||
) | const |
creates a absolute path from the pathToFile and the specified sub directory.
const juce::String getFileReference | ( | const String & | absoluteFileName, |
SubDirectories | dir | ||
) | const |
Creates a reference string that can be used to obtain the file in the project directory.
If the file is not in