OSG osgDB FileUtils FileNameUtil操作文件名相关函数
/** 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);
获取一个目录下全部文件名列表
osgDB::DirectoryContents dc=osgDB::getDirectoryContents(target_dir);
OSG osgDB FileUtils FileNameUtil操作文件名相关函数的更多相关文章
- Android FileUtils 文件操作类
系统路径 Context.getPackageName(); // 用于获取APP的所在包目录 Context.getPackageCodePath(); //来获得当前应用程序对应的apk文件的路径 ...
- day08-Python运维开发基础(文件操作与相关函数、函数基础)
1. 文件操作及相关函数 # ### 文件操作 """ fp = open("文件名称",mode=模式,encoding=编码集) fp 文件io对 ...
- [osg]osgDB的加载机制,使用3DS插件做参考(转,整理现有osgDB资料)
参考:http://blog.sina.com.cn/s/blog_7cdaf8b60102uzu3.html http://blog.csdn.net/wang15061955806/article ...
- [原][资料整理][osg]osgDB文件读取插件,工作机制,支持格式,自定义插件
参考: osgPlugins相关 osg读取文件的原理(插件工作机制) 当使用osgDB读取文件时,会自动根据文件的扩展名来到插件目录中寻找相应的插件,来实现. 比如: osgviewer cow.o ...
- osg osgDB::Options noTexturesInIVEFile ForceReadingImage dds_flip
osgDB::writeNodeFile(node, path, new osgDB::Options("noTexturesInIVEFile")); noTexturesInI ...
- php数据库操作常用相关函数
MySQL访问函数都需要有相应的权限才能运行.常用的相关函数介绍如下: (1)integer mysql_connect(主机,用户名,口令); 此函数开始一个对指定主机上的MySQL数据库的连接.若 ...
- [19/04/04-星期四] IO技术_CommonsIO(通用IO,别人造的轮子,FileUtils类 操作文件 & IOUtilsl类 操作里边的内容 )
一.概念 JDK中提供的文件操作相关的类,但是功能都非常基础,进行复杂操作时需要做大量编程工作.实际开发中,往往需要 你自己动手编写相关的代码,尤其在遍历目录文件时,经常用到递归,非常繁琐. Apac ...
- java使用FileUtils文件操作神器
前言: 在工作当中我们往往遇到很多文件的操作,我们也习惯写一些自己定义的工具类来简化文件操作,其实apache的commons的FileUtils类就是这样一个工具类,使用它能大大的简化我们对文件的操 ...
- PHP操作Redis相关函数
String数据类型 $redis->set('key','TK'); $redis->set('number','1'); //设置值 $redis->setex('key',5, ...
随机推荐
- 跨域攻击xss
要完全防止跨域攻击是很难的,对于有些站点是直接 拦截跨域的访问,在你从本站点跳转到其他站点时提醒,这算是一种手段吧. 而跨域攻击的发起就是在代码(包括html,css,js或是后台代码,数据库数据)里 ...
- hadoop之根据Rowkey从HBase中查询数据
1.Hbase 根据rowkey 查询 conf的配置信息如下: conf = new Configuration(); conf.set("hbase.zookeeper.quorum&q ...
- 关联规则之Aprior算法(购物篮分析)
0.支持度与置信度 <mahout实战>与<机器学习实战>一起该买的记录数占所有商品记录总数的比例——支持度(整体) 买了<mahout实战>与<机器学习实战 ...
- iOS设备 屏幕尺寸、操作系统、摄像头像素、发行时间 汇总
设备 硬件尺寸 软件尺寸 精密程度 操作系统 摄像头像素 发行时间 iPhone 4s 640 x 960 320 x 480 2x iOS 5 800万 2011.10.04 iPhone 5 64 ...
- bootstrap-dropdown
功能:实现点击时下拉框显示 插件:dropdown.js 要点:dropdown功能往往用在导航栏.导航条上,用作标题显示.dropdown与<ul><li>标签搭配用. 以d ...
- 全架构PaaS TAE 2.0的Docker实践
推荐链接: http://www.infoq.com/cn/news/2015/07/paas-tae-docker
- iTool拷贝app到电脑上
iTool拷贝app到电脑上 方法一. iTool找到你的app, 归档在桌面, 桌面就生成了ipa, 其实ipa是一个压缩包, 使用解压软件解压之后 生成Payload文件夹, 点开就可以看到Clo ...
- Attempt to present <vc> on <vc> which is already presenting <vc>/(null)
在给 tableViewCell 添加长按手势弹出一个 popViewController 的时候,遇到的这个变态问题: Warning: Attempt to present <UINavig ...
- SSH-Struts第一弹:ActionSupport类
Action继承了com.opensymphony.xwork2.ActionSupport. package com.candy.login; import com.opensymphony.xwo ...
- 剑指Offer 左旋转字符串
题目描述 汇编语言中有一种移位指令叫做循环左移(ROL),现在有个简单的任务,就是用字符串模拟这个指令的运算结果.对于一个给定的字符序列S,请你把其循环左移K位后的序列输出.例如,字符序列S=”abc ...