简体   繁体   中英

Howto detect if a folder is writable with Android Version 4.4.2 ( KITKAT )

With KITKAT 4.4.2 I get a EACCES permission denied when trying to write a file to a specific Folder. I know the new policy with Kitkat and I should use only the primary external storage path

Because a lot of users have already installed my app and stored data in different folders I like to figure out if a path is writeable or not.

I already simply tried to check this with file.canwrite() . This method returns true , even my app is not able to write to that path.

How can I detect if a directory is writeable with KITKAT?

Sorry that was a mistake from my side. It can be detected with file.canwrite().

From my side, it can't be detected with file.canWrite(). The path of the external sdcard is /sdcard1

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM