admin管理员组

文章数量:1122832

Is there a way to let users select a folder using a file picker package in Flutter and provide the app with read and write access to that folder?

I previously used the 'Manage External Storage' permission as I couldn't find any other solution, but the Play Store imposes strict restrictions on this permission. I've come across the Storage Access Framework (SAF) and wonder if it could be a viable alternative. Can SAF or any other framework handle this requirement?

Your assistance would be greatly appreciated!

Is there a way to let users select a folder using a file picker package in Flutter and provide the app with read and write access to that folder?

I previously used the 'Manage External Storage' permission as I couldn't find any other solution, but the Play Store imposes strict restrictions on this permission. I've come across the Storage Access Framework (SAF) and wonder if it could be a viable alternative. Can SAF or any other framework handle this requirement?

Your assistance would be greatly appreciated!

Share Improve this question edited Nov 22, 2024 at 11:36 Adarsh Tiwari asked Nov 22, 2024 at 11:17 Adarsh TiwariAdarsh Tiwari 616 bronze badges 4
  • Yes, I think SAF would be most suitable for your requirements (Reading and Writing to a folder), and also it is Play Store compliant. – Vansh Patel Commented Nov 22, 2024 at 11:25
  • Simply you can use the ACTION_OPEN_DOCUMENT_TREE to let users select specific folder and then get the URI of that folder, then you can read and write to files in that particular folder. – Vansh Patel Commented Nov 22, 2024 at 11:26
  • @VanshPatel Can you provide the link to packages which i could use. – Adarsh Tiwari Commented Nov 22, 2024 at 11:49
  • This pub.dev link and Github Link would help. – Vansh Patel Commented Nov 22, 2024 at 12:05
Add a comment  | 

1 Answer 1

Reset to default 0

Is there a way to let users select a folder using a file picker package in Flutter and provide the app with read and write access to that folder?

No. User can select folder to get or write data from/to the folder but the app won't get read and write access. If user's required to select folder every time, you don't need any permission

If you need to read/write data from/to external storage without user action, you can use Scoped Storage but app's access will be limited to app specific external storage folder.

本文标签: