码迷,mamicode.com
首页 > 数据库 > 详细

OSG osgDB FileNameUtil操作文件名相关函数

时间:2014-08-19 10:35:33      阅读:285      评论:0      收藏:0      [点我收藏+]

标签:os   io   文件   ar   art   cti   amp   ef   

/** 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);
/** If ‘to‘ is in a subdirectory of ‘from‘ then this function returns the subpath, otherwise it just returns the file name.
* The function does \b not automagically resolve paths as the system does, so be careful to give canonical paths.
* However, the function interprets slashes (‘/‘) ans backslashes (‘\‘) as they were equal.
*/
extern OSGDB_EXPORT std::string getPathRelative(const std::string& from, const std::string& to);
/** Gets root part of a path ("/" or "C:"), or an empty string if none found. */
extern OSGDB_EXPORT std::string getPathRoot(const std::string& path);
/** Tests if path is absolute, as !getPathRoot(path).empty(). */
extern OSGDB_EXPORT bool isAbsolutePath(const std::string& path);

 

OSG osgDB FileNameUtil操作文件名相关函数,布布扣,bubuko.com

OSG osgDB FileNameUtil操作文件名相关函数

标签:os   io   文件   ar   art   cti   amp   ef   

原文地址:http://www.cnblogs.com/coolbear/p/3921281.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!