惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

P
Privacy & Cybersecurity Law Blog
V
V2EX
月光博客
月光博客
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
The Register - Security
The Register - Security
MongoDB | Blog
MongoDB | Blog
P
Privacy International News Feed
The Last Watchdog
The Last Watchdog
Security Archives - TechRepublic
Security Archives - TechRepublic
美团技术团队
Stack Overflow Blog
Stack Overflow Blog
博客园 - 司徒正美
博客园 - 三生石上(FineUI控件)
V
Visual Studio Blog
cs.CV updates on arXiv.org
cs.CV updates on arXiv.org
K
Kaspersky official blog
S
Secure Thoughts
T
Tenable Blog
Security Latest
Security Latest
The Cloudflare Blog
S
Security @ Cisco Blogs
H
Heimdal Security Blog
aimingoo的专栏
aimingoo的专栏
TaoSecurity Blog
TaoSecurity Blog
Blog — PlanetScale
Blog — PlanetScale
Microsoft Security Blog
Microsoft Security Blog
Schneier on Security
Schneier on Security
Webroot Blog
Webroot Blog
G
Google Developers Blog
www.infosecurity-magazine.com
www.infosecurity-magazine.com
Scott Helme
Scott Helme
IT之家
IT之家
Latest news
Latest news
The Hacker News
The Hacker News
C
Check Point Blog
T
The Exploit Database - CXSecurity.com
H
Hackread – Cybersecurity News, Data Breaches, AI and More
腾讯CDC
C
CERT Recently Published Vulnerability Notes
NISL@THU
NISL@THU
N
News | PayPal Newsroom
Forbes - Security
Forbes - Security
P
Palo Alto Networks Blog
S
Security Affairs
S
Securelist
Google Online Security Blog
Google Online Security Blog
WordPress大学
WordPress大学
Last Week in AI
Last Week in AI
C
Cybersecurity and Infrastructure Security Agency CISA
A
About on SuperTechFans

博客园 - 浪端之渡鸟

老鼠跑猫叫主人惊醒c++观察者模式实现 讨论exe获取dll提供的单例,并获取单例所提供的带有vector<class A>& STL容器的返回值的情况-提供1种解决方法 vs2010 mfc dll 调试编译的问题 std::stringstream 模版实现,类型转换,遇到空格不跳出 字节对齐,对opencv的影响 跨平台,c语言创建多级路径代码分享 吐槽VS2010,卡死后,一直不能点,强制关机后代码丢失 opencv在MFC下使用的问题 fopen的打开方式 解决安装macports,不能更新的问题 坑爹啊,新手一个这问题折腾2天,xcode4.5拖上去控件真机调试就崩 静态页面转化 删除_svn文件夹 开发相关日志 WebClient.cs封装 symbian 输入控件不显示输入法解决: V3 V5宏定义 coco2d-x 重置z轴 htmlcontrol-for-symbian 源码解析
IOS App资源路径
浪端之渡鸟 · 2012-12-06 · via 博客园 - 浪端之渡鸟

//==============================================================================

// 资源目录

NSString *defaultDBPath = [[[NSBundle mainBundle] resourcePath] stringByAppendingPathComponent:filename];




//==============================================================================

// 获取程序Documents目录路径

// 目录列表

NSArray *paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES);

// 根目录

NSString *documentsDirectory = [paths objectAtIndex:0];

//==============================================================================

// 获取程序Library目录路径

// 目录列表

NSArray *paths = NSSearchPathForDirectoriesInDomains(NSLibraryDirectory, NSUserDomainMask, YES);

// 根目录

NSString *documentsDirectory = [paths objectAtIndex:0];

//==============================================================================

// 获取程序caches目录

NSArray *cache = NSSearchPathForDirectoriesInDomains(NSCachesDirectory, NSUserDomainMask, YES); 

NSString *cachePath = [cache objectAtIndex:0] ; 

//==============================================================================

//根据文件名来获取文件路径 doucument

- (NSString *)dataFilePath:(NSString *)sender

NSArray *path = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask,YES); 

NSString *documentDirectory = [path objectAtIndex:0]; 

return [documentDirectory stringByAppendingPathComponent:sender]; 

}

 //============================================================================== 

// 获取程序app文件所在目录路径

NSString *homePath = NSHomeDirectory();

//==============================================================================

// 获取程序tmp目录路径

NSString *tempPath = NSTemporaryDirectory();

//==============================================================================

// 获取程序应用包路径

NSString * path = [[NSBundlemainBundle] resourcePath];

//

NSString * path = [[NSBundle mainBundle] pathForResource: @"info" ofType: @"txt"];

//==============================================================================

//==============================================================================

//==============================================================================