/**
* Retrieve, creating if needed, a new directory in which the application
* can place its own custom data files. You can use the returned File
* object to create and access files in this directory. Note that files
* created through a File object will only be accessible by your own
* application; you can only set the mode of the entire directory, not
* of individual files.
*
* @param name Name of the directory to retrieve. This is a directory
* that is created as part of your application data.
* @param mode Operating mode. Use 0 or {@link #MODE_PRIVATE} for the
* default operation, {@link #MODE_WORLD_READABLE} and
* {@link #MODE_WORLD_WRITEABLE} to control permissions.
*
* @return A {@link File} object for the requested directory. The directory
* will have been created if it does not already exist.
*
* @see #openFileOutput(String, int)
*/
public abstract File getDir(String name, int mode);context getDir
最新推荐文章于 2023-06-09 15:20:09 发布
本文介绍了一个用于检索或创建应用程序自定义数据文件目录的方法getDir。此方法允许应用程序指定目录名称和操作模式,并返回一个File对象,该对象可用于创建和访问指定目录中的文件。

857

被折叠的 条评论
为什么被折叠?



