OpenSceneGraph  3.0.1
Namespaces | Defines | Functions | Variables
FileNameUtils File Reference
#include <osgDB/Export>
#include <string>
#include <vector>

Namespaces

namespace  osgDB
 

The osgDB library provides support for reading and writing scene graphs, providing a plugin framework and file utility classes.


Defines

#define OSGDB_FILENAMEUTILS   1

Functions

OSGDB_EXPORT std::string osgDB::getFilePath (const std::string &filename)
 Gets the parent path from full name (Ex: /a/b/c.Ext => /a/b).
OSGDB_EXPORT std::string osgDB::getFileExtension (const std::string &filename)
 Gets the extension without dot (Ex: /a/b/c.Ext => Ext).
OSGDB_EXPORT std::string osgDB::getFileExtensionIncludingDot (const std::string &filename)
 Gets the extension including dot (Ex: /a/b/c.Ext => .Ext).
OSGDB_EXPORT std::string osgDB::getLowerCaseFileExtension (const std::string &filename)
 Gets the lowercase extension without dot (Ex: /a/b/c.Ext => ext).
OSGDB_EXPORT std::string osgDB::getSimpleFileName (const std::string &fileName)
 Gets file name with extension (Ex: /a/b/c.Ext => c.Ext).
OSGDB_EXPORT std::string osgDB::getNameLessExtension (const std::string &fileName)
 Gets file path without last extension (Ex: /a/b/c.Ext => /a/b/c ; file.ext1.ext2 => file.ext1).
OSGDB_EXPORT std::string osgDB::getNameLessAllExtensions (const std::string &fileName)
 Gets file path without all extensions (Ex: /a/b/c.Ext => /a/b/c ; file.ext1.ext2 => file).
OSGDB_EXPORT std::string osgDB::getStrippedName (const std::string &fileName)
 Gets file name without last extension (Ex: /a/b/c.Ext => c ; file.ext1.ext2 => file.ext1).
OSGDB_EXPORT std::string osgDB::getPathRelative (const std::string &from, const std::string &to)
 If 'to' is in a subdirectory of 'from' then this function returns the subpath, otherwise it just returns the file name.
OSGDB_EXPORT std::string osgDB::getPathRoot (const std::string &path)
 Gets root part of a path ("/" or "C:"), or an empty string if none found.
OSGDB_EXPORT bool osgDB::isAbsolutePath (const std::string &path)
 Tests if path is absolute, as !getPathRoot(path).empty().
OSGDB_EXPORT std::string osgDB::convertFileNameToWindowsStyle (const std::string &fileName)
 Converts forward slashes (/) to back slashes (\).
OSGDB_EXPORT std::string osgDB::convertFileNameToUnixStyle (const std::string &fileName)
 Converts back slashes (\) to forward slashes (/).
OSGDB_EXPORT std::string osgDB::convertToLowerCase (const std::string &fileName)
OSGDB_EXPORT char osgDB::getNativePathSeparator ()
 Get the path separator for the current platform.
OSGDB_EXPORT bool osgDB::isFileNameNativeStyle (const std::string &fileName)
 Check if the path contains only the current platform's path separators.
OSGDB_EXPORT std::string osgDB::convertFileNameToNativeStyle (const std::string &fileName)
 Convert the path to contain only the current platform's path separators.
OSGDB_EXPORT bool osgDB::equalCaseInsensitive (const std::string &lhs, const std::string &rhs)
OSGDB_EXPORT bool osgDB::equalCaseInsensitive (const std::string &lhs, const char *rhs)
OSGDB_EXPORT bool osgDB::containsServerAddress (const std::string &filename)
OSGDB_EXPORT std::string osgDB::getServerProtocol (const std::string &filename)
OSGDB_EXPORT std::string osgDB::getServerAddress (const std::string &filename)
OSGDB_EXPORT std::string osgDB::getServerFileName (const std::string &filename)
OSGDB_EXPORT std::string osgDB::concatPaths (const std::string &left, const std::string &right)
 Concatenates two paths.
OSGDB_EXPORT std::string osgDB::getRealPath (const std::string &path)
 Removes .
OSGDB_EXPORT void osgDB::getPathElements (const std::string &path, std::vector< std::string > &out_elements)
 Splits a path into elements between separators (including Windows' root, if any).

Variables

const char osgDB::UNIX_PATH_SEPARATOR = '/'
const char osgDB::WINDOWS_PATH_SEPARATOR = '\\'

Define Documentation

#define OSGDB_FILENAMEUTILS   1

osg logo
Generated at Mon Oct 3 2011 12:39:39 for the OpenSceneGraph by doxygen 1.7.5.