From Sukender, "Here is my proposal. I fixed what Paul said, added some doxygen comments, added the function I told about, and removed the two "find('/')"-like calls to use only one."
This commit is contained in:
@@ -20,16 +20,27 @@
|
||||
|
||||
namespace osgDB {
|
||||
|
||||
/** Gets the parent path from full name (Ex: /a/b/c.Ext => /a/b). */
|
||||
extern OSGDB_EXPORT std::string getFilePath(const std::string& filename);
|
||||
/** Gets the extension without dot (Ex: /a/b/c.Ext => Ext). */
|
||||
extern OSGDB_EXPORT std::string getFileExtension(const std::string& filename);
|
||||
/** Gets the extension including dot (Ex: /a/b/c.Ext => .Ext). */
|
||||
extern OSGDB_EXPORT std::string getFileExtensionIncludingDot(const std::string& filename);
|
||||
/** Gets the lowercase extension without dot (Ex: /a/b/c.Ext => ext). */
|
||||
extern OSGDB_EXPORT std::string getLowerCaseFileExtension(const std::string& filename);
|
||||
/** Gets file name with extension (Ex: /a/b/c.Ext => c.Ext). */
|
||||
extern OSGDB_EXPORT std::string getSimpleFileName(const std::string& fileName);
|
||||
/** Gets file path without last extension (Ex: /a/b/c.Ext => /a/b/c ; file.ext1.ext2 => file.ext1). */
|
||||
extern OSGDB_EXPORT std::string getNameLessExtension(const std::string& fileName);
|
||||
/** Gets file path without \b all extensions (Ex: /a/b/c.Ext => /a/b/c ; file.ext1.ext2 => file). */
|
||||
extern OSGDB_EXPORT std::string getNameLessAllExtensions(const std::string& fileName);
|
||||
/** Gets file name without last extension (Ex: /a/b/c.Ext => c ; file.ext1.ext2 => file.ext1). */
|
||||
extern OSGDB_EXPORT std::string getStrippedName(const std::string& fileName);
|
||||
|
||||
|
||||
/** Converts forward slashes (/) to back slashes (\). */
|
||||
extern OSGDB_EXPORT std::string convertFileNameToWindowsStyle(const std::string& fileName);
|
||||
/** Converts back slashes (\) to forward slashes (/). */
|
||||
extern OSGDB_EXPORT std::string convertFileNameToUnixStyle(const std::string& fileName);
|
||||
extern OSGDB_EXPORT std::string convertToLowerCase(const std::string& fileName);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user