开发者

Get absolute path to a file create by openFileOutput method in Android

开发者 https://www.devze.com 2023-02-14 19:31 出处:网络
can you tell me what the full path of开发者_如何学运维 my xml file, which is created through the following method:

can you tell me what the full path of开发者_如何学运维 my xml file, which is created through the following method:

fileos = openFileOutput("new.xml", MODE_PRIVATE);

Thank you for your help.


Even better, Android will tell you that by itself. :-) Use the following code:

getFileStreamPath("new.xml");

The SDK says:

Returns the absolute path on the filesystem where a file created with openFileOutput(String, int) is stored.

0

精彩评论

暂无评论...
验证码 换一张
取 消