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

推荐订阅源

云风的 BLOG
云风的 BLOG
Security Archives - TechRepublic
Security Archives - TechRepublic
V
Vulnerabilities – Threatpost
C
CXSECURITY Database RSS Feed - CXSecurity.com
P
Proofpoint News Feed
G
GRAHAM CLULEY
P
Privacy International News Feed
The Hacker News
The Hacker News
Forbes - Security
Forbes - Security
U
Unit 42
N
News and Events Feed by Topic
D
Darknet – Hacking Tools, Hacker News & Cyber Security
C
Cyber Attacks, Cyber Crime and Cyber Security
C
Cisco Blogs
A
About on SuperTechFans
cs.CV updates on arXiv.org
cs.CV updates on arXiv.org
D
Docker
I
Intezer
Spread Privacy
Spread Privacy
The Last Watchdog
The Last Watchdog
V2EX - 技术
V2EX - 技术
S
Security @ Cisco Blogs
F
Full Disclosure
S
Secure Thoughts
M
MIT News - Artificial intelligence
Microsoft Security Blog
Microsoft Security Blog
G
Google Developers Blog
aimingoo的专栏
aimingoo的专栏
W
WeLiveSecurity
cs.CL updates on arXiv.org
cs.CL updates on arXiv.org
Project Zero
Project Zero
Recorded Future
Recorded Future
Cyberwarzone
Cyberwarzone
S
Security Affairs
AWS News Blog
AWS News Blog
H
Help Net Security
The GitHub Blog
The GitHub Blog
Hacker News: Ask HN
Hacker News: Ask HN
Vercel News
Vercel News
P
Proofpoint News Feed
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
The Register - Security
The Register - Security
S
Schneier on Security
F
Fortinet All Blogs
C
CERT Recently Published Vulnerability Notes
L
LINUX DO - 最新话题
T
Tor Project blog
T
The Exploit Database - CXSecurity.com
MongoDB | Blog
MongoDB | Blog
Webroot Blog
Webroot Blog

博客园 - 恋上你的笑

NSDateFormatter format strings math.h里的数学计算公式介绍<转> SQLite函数大全 GCD介绍(转) Objective-C Blocks研究(转) CGContext<转CC> Iphone开发-NSdata 与 NSString,Byte数组,UIImage 的相互转换<转> Mac下的svn命令使用方法<转> 解决:XCODE 4.2 无法连接SVN,提示:Unable to load revisions ios开发小知识3 xcode中使用ARC问题 app在程序中设置版本自动更新的步骤 ios常用网络编程要点 NSString用法总结 Quartz 2D编程 ios开发小知识2(转自cc) object-c开发中混合使用或不使用ARC(转) 3DES+Base64 加密解密的方法(转) In App Purchases 入门(转)
常用路径操作方法
恋上你的笑 · 2012-08-21 · via 博客园 - 恋上你的笑

下面表格中的措施  可以用来操作  路径:

措施名称描述
+(NSString *)pathWithComponents:components用components创建有效的路径名称
-(NSArray *)pathComponents将路径名称拆分成若干组成部分
-(NSString *)lastPathComponent获取路径名称中最后一个组成部分
-(NSString *)pathExtension获取路径名称中的扩展名(后缀名)
-(NSString *)stringByAppendingPathComponent:path将path添加到已有的路径名称末尾
-(NSString *)stringByAppendingPathExtension:ext将扩展名ext添加到已有的路径名称的最后一个组成部分的末尾
-(NSString *)stringByDeletingLastPathComponent将已有的路径名称的最后一个组成部分删除
-(NSString *)stringByDeletingPathExtension删除已有路径名称的扩展名
-(NSString *)stringByExpandingTildeInPath将路径名称中的~字符展开
-(NSString *)stringByResolvingSymlinksInPath解析路径名称中的符号链接
-(NSString *)stringByStandardizingPath将路径名称标准化

下面表格中的函数  可以用来获取  用户名、用户的主目录路径  还有  临时目录路径:

函数名称描述
NSString *NSUserName(void)获取当前用户的登录名
NSString *NSFullUserName(void)获取当前用户的全名
NSString *NSHomeDirectory(void)获取当前用户的主目录路径
NSString *NSHomeDirectoryForUser(NSString *user)获取用户user的主目录路径
NSString *NSTemporaryDirectory(void)获取临时目录的路径