android developer
android developer

Reputation: 116412

How to perform basic operations on files using DocumentFile API?

Background

Starting from API 21 (Lollipop), apps can get a special "permission" to modify real SD-cards, as shown on previous posts I've written (here and here).

The problem

I can delete files, and I can also create them, but I can't find a way to perform other basic file operations:

The question

How do I get those features? Surely it's possible to perform basic read and write, for example...

Upvotes: 1

Views: 1464

Answers (1)

Sahar Avr
Sahar Avr

Reputation: 131

Using FileUilts for Lollipop gives you most of those options, have you seen this: https://github.com/jeisfeld/Augendiagnose/blob/master/Augendiagnose/src/de/eisfeldj/augendiagnose/util/imagefile/FileUtil.java ?

(I could not add a comment)

Upvotes: 1

Related Questions