- (NSData*)readDataFromFileAtURL:(NSURL*)anURL {
NSFileHandle* aHandle = [NSFileHandle fileHandleForReadingFromURL:anURL
error:nil];
NSData* fileContents = nil;
if (aHandle)
fileContents = [aHandle readDataToEndOfFile];
return fileContents;
}
Reading the contents of a file using NSFileHandle
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章
Saving a file with a new type
chuanyituoku
2020-07-08 09:03:58
Reading the contents of a file using POSIX functions
chuanyituoku
2020-07-08 09:03:57
How to create a custom directory for app files inside the ~/Library/Application Support directory.
chuanyituoku
2020-07-08 09:03:56
Foundation 之 NSValue
spark_csdn
2020-07-06 09:11:29
mac滲透測試常用工具
mtnk2009
2020-06-28 06:20:53
Mac中徹底刪除搜狗拼音輸入法一法
东东课堂
2020-06-28 01:38:59
Vagrant中搭建Docker虛擬環境(上)-Mac
珠宝壹佰.未闻
2020-06-22 12:04:40
xcode5中 wax 安裝記錄
狼_夏天
2020-06-20 18:56:07
在Mac上用Eclipse + Maven配置Selenium WebDriver開發環境
python012
2020-06-20 04:13:51
macVim無法保存歷史記錄的問題
orca_m
2020-02-23 22:46:34
Installing Tomcat 8 on OS X 10.10 Yosemite
intergameover
2020-02-23 20:01:02
Foundation 之 NSString和NSMutableString
spark_csdn
2020-02-23 16:18:03
Foundation 之 NSNumber
spark_csdn
2020-02-23 16:18:03
Foundation 之 NSData
spark_csdn
2020-02-23 16:18:03
Foundation 之 NSArray和NSMutableArray
spark_csdn
2020-02-23 16:18:03