iPhone中应用程序的“文档”文件夹

编程入门 行业动态 更新时间:2024-10-27 23:20:15
本文介绍了iPhone中应用程序的“文档”文件夹的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

我正在使用Dropbox API并在应用程序文档文件夹中下载文件。

I am using dropbox API and downloading file in application document folder.

我能够从文档目录查看表中的文件列表。如何从此表格视图中读取照片或文件?

I am able to view list of files in table from document directory. How can I read photos or file from this table view?

iPhone呢?我们可以直接访问文档文件夹吗?

And what about the iPhone. Can we access document folder directly?

推荐答案

这是获取文档目录的最常用方法–

This is the more commonly used approach to get the documents directory –

NSArray *searchResults = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES); NSString *documentsDirectory = [searchResults objectAtIndex:0]; NSString *filePath = [documentsDirectory stringByAppendingPathComponent:fileName];

您可以使用 NSFileManager 来检查目录。您可以查看 contentsOfDirectoryAtPath:error:方法。

更多推荐

iPhone中应用程序的“文档”文件夹

本文发布于:2023-11-12 17:06:12,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1582050.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:应用程序   文件夹   文档   iPhone

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!