NSFileManager 方法

来源:互联网 发布:java开发工作经历描述 编辑:程序博客网 时间:2024/05/01 19:32

下面这个表格中的措施  适用于  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改变文件属性
0 0