蓝懿 知识点总结
来源:互联网 发布:北京java培训学校 编辑:程序博客网 时间:2024/04/30 02:40
在蓝懿的日子之 2015年9月13日
今天北京的天气非常不错,万里无云。
今天刘国斌老师讲的的内容有以下:
查找文件:
if (self.mySwitch.isOn) {//模糊查找
if ([fileName rangeOfString:self.myTF.text].length>0) {
[self.paths addObject:filePath];
[self.tableViewreloadData];
}
}else{//精确查找
if ([fileName isEqualToString:self.myTF.text]) {
[self.pathsaddObject:filePath];
[self.tableViewreloadData];
}
}
递归方法:
-(void)findFileWithPath:(NSString *)path{
NSFileManager *fm = [NSFileManagerdefaultManager];
NSArray *fileNames = [fm contentsOfDirectoryAtPath:path error:nil];
for (NSString *fileName in fileNames) {
NSString *filePath = [path stringByAppendingPathComponent:fileName];
if ([fileName hasSuffix:@".jpg"]||[fileName hasSuffix:@".png"]) {
NSLog(@"%@",filePath);
[fm removeItemAtPath:filePath error:nil];
}
//判断如果是文件夹需要进到文件夹里面去找
BOOL isDir = NO;
if ([fm fileExistsAtPath:filePath isDirectory:&isDir]&&isDir) {
[selffindFileWithPath:filePath];
}
}
}
- 蓝懿 知识点总结
- 蓝懿学习 练习总结
- 蓝农项目总结
- 蓝懿
- 蓝桥杯赛后总结
- 知识点总结:
- 知识点总结
- 知识点总结
- 知识点总结
- 知识点总结
- 知识点总结
- 知识点总结
- 知识点总结
- 知识点总结
- 知识点总结
- 知识点总结
- 知识点总结
- 知识点总结
- windows下面安装Python和pip终极教程
- Testlink可能遇到的问题
- 三大WEB服务器对比分析(apache ,lighttpd,nginx)
- Untiy3D笔记之番外篇——判断手指滑动方向
- hdu5438 Ponds(并查集、拓扑排序)
- 蓝懿 知识点总结
- Date
- 文件的创建与删除
- Windows Linux进程间通信的细分
- SQL基础操作
- Invalidate()和UpdateWindow()的区别
- eclipse中配置tomcat的路径问题
- iOS开发中常用的设计模式
- IOS开发—IOS绘制圆,直线,弧线,矩形,扇形,三角形,贝塞尔等图形