什么文件系统路径使用Android的Context.openFileOutput()? [英] What file system path is used by Android's Context.openFileOutput()?
问题描述
我不明白为什么这个问题的答案是不是在Android开发者文档;我觉得他们一直令人沮丧的。
再在Context类的openFileOutput()方法来打开一个只写一个文件,内部存储的文件路径它写的是什么?
<一个href="http://developer.android.com/reference/android/content/Context.html">http://developer.android.com/reference/android/content/Context.html
<一个href="http://developer.android.com/guide/topics/data/data-storage.html#filesInternal">http://developer.android.com/guide/topics/data/data-storage.html#filesInternal
再在Context类的openFileOutput()方法来打开一个只写一个文件,内部存储的文件路径它写的是什么?
据指出,其中 getFilesDir()
在上下文
的回报。可以这么说,因为该文件说:
返回的绝对路径在哪里与openFileOutput(字符串,INT)创建的文件都存储在文件系统的目录。
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
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.
这篇关于什么文件系统路径使用Android的Context.openFileOutput()?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!