Loading...
Searching...
No Matches
CResourceManager Class Reference

## Public Member Functions

| CResourceManager (const char *argv0)

## Static Public Member Functions

static std::string | CleanPath (const std::string &path)
static bool | AddLocation (const std::string &location, bool prepend=true, const std::string &mountPoint="")
| Add a location to the search path.
static bool | RemoveLocation (const std::string &location)
| Remove a location from the search path.
static std::vector< std::string > | GetLocations ()
| List all locations in the search path.
static bool | LocationExists (const std::string &location)
| Check if given location is in the search path.
static bool | SetSaveLocation (const std::string &location)
static std::string | GetSaveLocation ()
static std::unique_ptr< CSDLFileWrapper > | GetSDLFileHandler (const std::string &filename)
static std::unique_ptr< CSDLMemoryWrapper > | GetSDLMemoryHandler (const std::string &filename)
static std::unique_ptr< CSNDFileWrapper > | GetSNDFileHandler (const std::string &filename)
static bool | Exists (const std::string &filename)
| Check if file exists.
static bool | DirectoryExists (const std::string &directory)
| Check if file exists and is a directory.
static bool | CreateNewDirectory (const std::string &directory)
| Create directory in write directory.
static bool | RemoveExistingDirectory (const std::string &directory)
| Remove directory in write directory, recursively.
static std::vector< std::string > | ListFiles (const std::string &directory, bool excludeDirs=false)
| List files contained in directory.
static std::vector< std::string > | ListDirectories (const std::string &directory)
| List directories contained in directory.
static long long | GetFileSize (const std::string &filename)
| Returns file size in bytes.
static long long | GetLastModificationTime (const std::string &filename)
| Returns last modification date as timestamp.
static bool | Remove (const std::string &filename)
| Remove file.

## Member Function Documentation

## AddLocation()

bool CResourceManager::AddLocation | ( | const std::string & | location,
|  | bool | prepend = true,
|  | const std::string & | mountPoint = "" )

static

Add a location to the search path.

## RemoveLocation()

bool CResourceManager::RemoveLocation | ( | const std::string & | location | ) |

static

Remove a location from the search path.

## GetLocations()

std::vector< std::string > CResourceManager::GetLocations | ( |  | ) |

static

List all locations in the search path.

## LocationExists()

bool CResourceManager::LocationExists | ( | const std::string & | location | ) |

static

Check if given location is in the search path.

## Exists()

bool CResourceManager::Exists | ( | const std::string & | filename | ) |

static

Check if file exists.

## DirectoryExists()

bool CResourceManager::DirectoryExists | ( | const std::string & | directory | ) |

static

Check if file exists and is a directory.

## CreateNewDirectory()

bool CResourceManager::CreateNewDirectory | ( | const std::string & | directory | ) |

static

Create directory in write directory.

## RemoveExistingDirectory()

bool CResourceManager::RemoveExistingDirectory | ( | const std::string & | directory | ) |

static

Remove directory in write directory, recursively.

## ListFiles()

std::vector< std::string > CResourceManager::ListFiles | ( | const std::string & | directory,
|  | bool | excludeDirs = false )

static

List files contained in directory.

## ListDirectories()

std::vector< std::string > CResourceManager::ListDirectories | ( | const std::string & | directory | ) |

static

List directories contained in directory.

## GetFileSize()

long long CResourceManager::GetFileSize | ( | const std::string & | filename | ) |

static

Returns file size in bytes.

## GetLastModificationTime()

long long CResourceManager::GetLastModificationTime | ( | const std::string & | filename | ) |

static

Returns last modification date as timestamp.

## Remove()

bool CResourceManager::Remove | ( | const std::string & | filename | ) |

static

Remove file.

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

- src/common/resources/resourcemanager.h
- src/common/resources/resourcemanager.cpp