The hard part is the user interface, not the backend. The application needs to invoke a privileged UI where the user can choose which files or directories the application may access.
(many storage media are formatted using FAT, so the media API is probably not implemented using Unix permissions)