I can do it with FileTools with
But I need to do it with SAF. I tried but nothing worked, please help
P.S. don't look at variable error, i made this block only for screenshot
I can do it with FileTools with
will try to list files in a directory
not sure you can do this recursively for subfolders, you would need to use a file extension to do this, or build a procedure that uses the file component blocks to do the same.
I meant with all dirs and subdirs. Like this
['/Downloads/fl.txt', '/Downloads/doc.pdf', '/Downloads/ai2.aia', ['/Downloads/SUBDIR/text.txt', '/Downloads/SUBDIR/RandomNum.py'], [None, '/Downloads/EmptyDir']]
I think this is not possible with SAF. You have to open each folder individually with SAF and grant access to be able to list its contents.
Note: You cannot open
/Download
and the root directory of the external storage with SAF (but all others, including/Downloads
).
I don't need subfolders anymore (they're not needed in my app, i understood it only today). Sorry for asking. But anyway thanks for answering
If I understand the question correctly then yes it's possible to list dirs recursively.
saf.aia (33.1 KB)
Yes, but you have to select each subfolder individually.
How about blocks?...
How about testing and giving feedback first?
Oh sorry, forgot to say it. App works exactly how I wanted, I just really wanted to see the blocks
Added.
These two blocks expanded please ?
I see it doesn't recurse if there are sub/sub folders, e.g.
Documents/subfolder/subsubfolder
Yes, but is it really necessary to list even 3rd and 4th level subfolders? However, since you now know the logic, in principle it should be possible.
I figured out a clunky workaround for the stupid /Download folder restriction using SAF.
no need to do this is if you only want to OPEN_DOCUMENT/GET_CONTENT.
Well, this is nothing new, because the same applies to the root dir of the external storage. This cannot be selected, but any subfolder (except the root dir of the /Download folder) can be selected. Therefore, the same reasoning/logic applies to the /Download directory as well.
Apart from that, who would this help? Since the app has no access to non-media files in this folder that it did not create itself, the only option would be for the user to do it manually on their device. Who would be willing to do that and why?