File permissions in Android

后端 未结 3 1275
故里飘歌
故里飘歌 2021-01-05 23:48

I\'m here just to ask something maybe very simple, I\'m working with Files, FileOutputStream and FileInputStream, But I just want to get/se

3条回答
  •  情深已故
    2021-01-06 00:24

    Android uses the standard Java API for handling files and file permissions. Here's a a page discussing permissions in Java.

    Basically all you need to do is getting the FilePermission object of the file, then getting the PermissionCollection from the FilePermission object with the newPermissionCollection() method and then add or remove items to or from that collection.

提交回复
热议问题