Android的Context.openFileOutput()使用什么文件系统路径?(What file system path is used by Android's Context.

编程入门 行业动态 更新时间:2024-10-27 20:33:40
Android的Context.openFileOutput()使用什么文件系统路径?(What file system path is used by Android's Context.openFileOutput()?)

我不明白为什么这个答案不在Android开发者文档中; 我发现他们一直令人沮丧。

在Context类上重新使用openFileOutput()方法来打开写入文件,写入哪些内部存储文件路径?

http://developer.android.com/reference/android/content/Context.html

http://developer.android.com/guide/topics/data/data-storage.html#filesInternal

I can't understand why the answer to this isn't in the Android developer docs; I find them consistently frustrating.

Re the openFileOutput() method on the Context class to open a file for writing, what internal storage file path does it write to?

http://developer.android.com/reference/android/content/Context.html

http://developer.android.com/guide/topics/data/data-storage.html#filesInternal

最满意答案

在Context类上重新使用openFileOutput()方法来打开写入文件,写入哪些内部存储文件路径?

它指向Context上的getFilesDir()返回的位置。 您可以告诉这一点,因为文档说:

返回文件系统目录的绝对路径,其中存储使用openFileOutput(String,int)创建的文件。

Re the openFileOutput() method on the Context class to open a file for writing, what internal storage file path does it write to?

It points to where getFilesDir() on Context returns. You can tell this because the documentation says:

Returns the absolute path to the directory on the filesystem where files created with openFileOutput(String, int) are stored.

更多推荐

本文发布于:2023-08-07 20:33:00,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1465917.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:文件系统   路径   openFileOutput   Android   Context

发布评论

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

>www.elefans.com

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