文件系统扫描的工具类
来源:互联网 发布:工作流管理系统源码 编辑:程序博客网 时间:2024/06/07 08:28
文件系统扫描的工具类
说明
- 递归扫描文件夹系统,并以树形结构组织起来
- 支持沙盒、bundle扫描
- 支持扫描深度设置
- 用File对象表示一个扫描出来的文件,File对象包含了一个文件或者文件夹的基本文件信息(如文件名字,是否隐藏,文件扩展名,文件url地址等等),便于后续操作
源码
https://github.com/YouXianMing/FileManager
//// ViewController.m// FileManager//// Created by YouXianMing on 15/11/19.// Copyright © 2015年 YouXianMing. All rights reserved.//#import "ViewController.h"#import "FileManager.h"@interface ViewController ()@end@implementation ViewController- (void)viewDidLoad { [super viewDidLoad]; // Scan files. File *file = [FileManager scanRelatedFilePath:@"~/Library" maxTreeLevel:1]; NSLog(@"\n\n%@ \n%@\n\n", file, file.subFiles); // Get the real file path from related file path. NSLog(@"%@", [FileManager theRealFilePath:@"~/Documents"]); NSLog(@"%@", [FileManager theRealFilePath:@"-"]); // Check the file at the given path exist or not. NSLog(@"%d", [FileManager fileExistWithRealFilePath:[FileManager theRealFilePath:@"~/Library/Caches"]]); NSLog(@"%d", [FileManager fileExistWithRealFilePath:[FileManager theRealFilePath:@"~/YouXianMing"]]);}@end
细节
posted @ 2015-12-05 06:49 YouXianMing 阅读(88) 评论(2) 编辑 收藏
1 0
- 文件系统扫描的工具类
- 类扫描工具类
- 制作文件系统的工具
- 简单的扫描工具NTscan
- 强悍的nmap扫描工具
- 强悍的nmap扫描工具
- java 扫描局域网的工具
- 强悍的nmap扫描工具
- java扫描包中的所有类的工具类
- 当前包下的Class扫描工具类
- 嵌入式文件系统工具的来源
- 扫描工具
- 扫描工具
- 扫描工具
- 扫描工具
- 常用的网站漏洞扫描工具
- Backtrack5常用的漏洞扫描工具
- 扫描死链接的工具xenu
- 深入理解java垃圾回收机制
- 项目管理工具—Maven
- HASH相关
- 我想静静2
- 修改git已经commit的邮箱和用户名
- 文件系统扫描的工具类
- MyEclipse2014 优化设置
- ZOJ 1860:Dog & Gopher
- ___19__C#手动编写Stack类,模拟栈的数据操作
- 如何防止android app被kill
- POJ 1065:Wooden Sticks
- Unicon字符串转成汉字String
- 【已解决】找不到android.support.v7.internal.app.WindowDecorActionbar
- callBackName cannot be found&fullPathForFilename: No file found at replay.png. 解决方案