gpt4 book ai didi

objective-c - ios从私网地址读取内容

转载 作者:行者123 更新时间:2023-11-28 20:42:53 27 4
gpt4 key购买 nike

我需要读取一个文件,例如:

\\192.168.0.1\Folder\Readme.txt

我怎样才能将这个文件从我的应用程序读入 iPhone

最佳答案

NSString *pathToTextFile;
NSError *readError;
NSString *fileData = [NSString stringWithContentsOfFile:pathToTextFile
encoding:NSUTF8StringEncoding
error:*readError]

NSLog(@"here is your file as string = %@",fileData);

关于objective-c - ios从私网地址读取内容,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/7686661/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com