|
LightWrap++
AC++wrapperfortheLightWave3DSDK
|
Manages file names that are content directory aware. More...
#include <file_request.h>
Inheritance diagram for lwpp::FileName:
Collaboration diagram for lwpp::FileName:Public Member Functions | |
| FileName (const char *_baseDir=LWFTYPE_CONTENT, bool base=false) | |
| FileName (const std::string name, bool base=false) | |
| bool | Exists () |
| std::string | getAbsoluteName () |
| std::string | getFileExtension () |
| std::string | getFileName (void) |
| return the file name only | |
| const char * | getFullName () |
| create the full path if needed | |
| std::string | getFullPath (void) |
| return full Path | |
| std::string | getPath (void) |
| return the relative Path only | |
| std::string | getRelativeName () |
| Get the file name relative to the base dir. | |
| const char * | getRelativeNameC () |
| LWError | Load (const LoadState &ls) |
| Read Instance data. | |
| FileName & | operator= (const char *name) |
| FileName & | operator= (const std::string name) |
| LWError | Save (const SaveState &ss) |
| Write Instance data. | |
| void | setExtractedExtension (const char *source) |
| Extract the extension from a string that includes "(.ext)" - such as the names of image savers. | |
| void | setFileExtension (const char *extension="") |
| Set the extension of the filename. | |
| void | setFileName (const std::string name) |
| Set the file name only. | |
| void | setFullName (const std::string name) |
| Set to a full name. This splits the components and stores them. | |
| void | stripNumberTrail (void) |
Static Public Member Functions | |
| static bool | Exists (const std::string &name) |
| Check if a file exists. | |
| static std::string | extractImageExtension (const char *source) |
Manages file names that are content directory aware.
A filename consists of three components:
The fullPath is the basePath + relativePath.
The fully qualified name of the file is fullPath + fileName.
Rework this for other operating systems.
Change this into a more generic disk asset manager
|
inline |
| *_baseDir | LWFTYPE_* style content directory description |
| base | Set to true if the base name should be taken into account |
|
inline |
|
static |
Check if a file exists.
|
inline |
|
static |
|
inline |
|
inline |
| std::string lwpp::FileName::getFileName | ( | void | ) |
return the file name only
|
inline |
create the full path if needed
| std::string lwpp::FileName::getFullPath | ( | void | ) |
return full Path
| std::string lwpp::FileName::getPath | ( | void | ) |
return the relative Path only
| std::string lwpp::FileName::getRelativeName | ( | ) |
Get the file name relative to the base dir.
| const char * lwpp::FileName::getRelativeNameC | ( | ) |
|
virtual |
Read Instance data.
Reimplemented from lwpp::Storeable.
|
inline |
|
inline |
|
virtual |
Write Instance data.
Reimplemented from lwpp::Storeable.
|
inline |
Extract the extension from a string that includes "(.ext)" - such as the names of image savers.
|
inline |
Set the extension of the filename.
|
inline |
Set the file name only.
|
inline |
Set to a full name. This splits the components and stores them.
| void lwpp::FileName::stripNumberTrail | ( | void | ) |