All Classes Namespaces Functions Variables Enumerations Enumerator Modules Pages
Public Member Functions | Static Public Member Functions | List of all members
ProjectHandler Class Reference

Public Member Functions

File getSubDirectory (SubDirectories dir) const
 
File getWorkDirectory () const
 
bool isRedirected (SubDirectories dir) const
 
bool isActive () const
 
String getFilePath (const String &pathToFile, SubDirectories subDir) const
 
const String getFileReference (const String &absoluteFileName, SubDirectories dir) const
 
void createLinkFile (SubDirectories dir, const File &relocation)
 
void getFileList (Array< File > &filesInDirectory, SubDirectories dir, const String &wildcard, bool sortByTime=false, bool searchInSubfolders=false)
 

Static Public Member Functions

static bool isAbsolutePathCrossPlatform (const String &pathName)
 

Detailed Description

The class that wraps all file resolving issues.

It assumes a working directory and supplies correct paths for all OSes relative to the project root folder.

Member Function Documentation

void createLinkFile ( ProjectHandler::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.

void getFileList ( Array< File > &  filesInDirectory,
SubDirectories  dir,
const String &  wildcard,
bool  sortByTime = false,
bool  searchInSubfolders = false 
)

Fills the given array with the contents of the specified directory. If 'sortByTime' is true, the most recent files will be the first items in the list.

String getFilePath ( const String &  pathToFile,
SubDirectories  subDir 
) const

creates a absolute path from the pathToFile and the specified sub directory.

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.

If the file is not in

File getSubDirectory ( SubDirectories  dir) const

Returns the subdirectory.

File getWorkDirectory ( ) const

Returns the current work directory.

static bool isAbsolutePathCrossPlatform ( const String &  pathName)
inlinestatic

checks if this is a absolute path (including absolute win paths on OSX and absolute OSX paths on windows);

bool isActive ( ) const

Checks if the ProjectHandler is active (if a directory is set).

bool isRedirected ( ProjectHandler::SubDirectories  dir) const

Checks if a directory is redirected.

©2017 HISE. This documentation is autogenerated from the HISE source code using Doxygen.