最新消息:20210816 当前crifan.com域名已被污染,为防止失联,请关注(页面右下角的)公众号

[基本解决]iOS里面的app可以使用的用于保存文件的路径和文件夹有哪些

iOS crifan 3658浏览 0评论

swift ios app file folder

Working with Directories in Swift on iOS 8 – Techotopia

ios – How to check if a file exists in the Documents directory in Swift? – Stack Overflow

Accessing The App Documents folder, The Swift Way | The App Lady

File Management Tutorial in iOS8 with Swift – iOScreator

swift iOs NSTemporaryDirectory

NSTemporaryDirectory / NSItemReplacementDirectory / mktemp(3) – NSHipster

Basic File Reading and Writing Using Swift in iOS 8

objective c – Accessing temp directory in Swift – Stack Overflow

暂时是用了:

NSSearchPathDirectory.DocumentDirectory

代码为:

            let saveFileOk:Bool = FileSave.saveData(respData!, directory: NSSearchPathDirectory.DocumentDirectory, path: self.fileItem.name, subdirectory: "")
            print("saveFileOk=\(saveFileOk)")
           
            if let readOutData:NSData = FileLoad.loadData(self.fileItem.name, directory: NSSearchPathDirectory.DocumentDirectory, subdirectory: "") {
                print("readOutData=\(readOutData)")
               
                print("respData==readOutData = \(respData==readOutData)") //respData==readOutData = true
            }

转载请注明:在路上 » [基本解决]iOS里面的app可以使用的用于保存文件的路径和文件夹有哪些

发表我的评论
取消评论

表情

Hi,您需要填写昵称和邮箱!

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址
83 queries in 0.180 seconds, using 22.00MB memory