常见的NSFileManager方法
来源:互联网 发布:手机动漫配音软件 编辑:程序博客网 时间:2024/05/22 11:40
常见NSFileManager文件方法
-(NSData *)contentsAtPath:path
从path所代表的文件中读取数据
-(BOOL)createFileAtPath:path contents:(BOOL)data attributes:attr
将数据写入文件
-(BOOL)removeFileAtPath:path handler:handler
将path所代表的文件删除
-(BOOL)movePath:from toPath:to handler:handler
移动或者重命名文件,to所代表的文件不能是已经存在的文件
-(BOOL)copyPath:from toPath:to handler:handler
复制文件,to所代表的文件不能是已经存在的文件
-(BOOL)contentsEqualAtPath:path1 andPath:path2
比较path1和path2所代表的文件
-(BOOL)fileExistsAtPath:path
检查path所代表的文件是否存在
-(BOOL)isReadableFileAtPath:path
检查path所代表的文件是否存在、是否可读
-(BOOL)isWritableFileAtPath:path
检查path所代表的文件是否存在、是否可写
-(NSDictionary *)fileAttributesAtPath:path traverseLink:(BOOL)flag
获取path所代表的文件属性
-(BOOL)changeFileAttributes:attr atPath:path
改变文件属性
常见的NSFileManager目录的方法:
-(NSString *)currentDirectoryPath
获取当前目录
-(BOOL)changeCurrentDirectoryPath:path
更改当前目录
-(BOOL)copyPath:from toPath:to handler:handler
复制目录结构,to不能已经存在
-(BOOL)createDirectoryAtPath:path attributes:attr
创建目录
-(BOOL)fileExistsAtPath:path isDirectory:(BOOL *)flag
测试文件是否为目录 (flag存储结构yes/no)
-(NSArray *)contentsOfDirectoryAtPath:path
列出目录的内容
-(NSDirectoryEnumerator *enumeratorAtPath:path
枚举目录的内容
-(BOOL)removeFileAtPath:path handler:handler
删除空目录
-(BOOL)movePath:from toPath:tohandler:handler
重命名或移动一个目录,to不能是已经存在的
- 常见的NSFileManager方法
- 20-OC中NSFileManager的常见方法
- NSFileManager 方法
- NSFileManager处理目录的一些方法
- NSFileManager处理目录的一些方法
- NSFileManager常用方法解释
- NSFileManager类方法整理
- NSFileManager 常用方法
- NSFileManager一般常用方法
- 解决[[NSFileManager defaultManager] contentsOfDirectoryAtPath 方法获取不到数据的bug
- Foundation框架第十二弹:NSFileManager的常用方法
- iOS——(文件管理)NSFileManager的常用方法
- ios 下创建,删除文件夹的方法 NSFileManager
- ios NSFileManager的细节
- NSFileManager的使用
- NSFileManager的用法
- NSfileManager的使用方法
- NSFileManager的使用
- KVO(键值监听模式)
- 利用Strapdown.js和markdown写极简静态博客
- S_ISREG等几个常见的宏 .
- Marvell8686 电源管理原理
- Full Screen Web Apps
- 常见的NSFileManager方法
- How to use log4net in C# application
- JAVA 多态的作用
- poj 1579 Function Run Fun(把一个递归函数变快,用数组 记忆化处理)
- 在线使用FreeTextBox编辑器时,打空格的时候出现乱码,问号(?)
- memcached完全剖析–1. memcached的基础
- AJAX包含的技术和AJAX的缺陷
- linux下java程序使用第三方jar包
- 关于学习数学