File Access assistance for android

If some of you are still struggling with Android file i/o, this may be some help.
I have spent the last few months trying hard (with a huge amount of support and help from Dave Nottage!) to put together a programme which can find files, read files (character and getting the android system to view them), write and append to files, create directories, and delete files and directories.
It is not the fastest, using the routines which are nearly simple enough for me to understand. If you have a directory with a thousand files, be prepared to enjoy a cup of tea while you wait!

This programme “FileAccess” is available via
https://59b7770ca3fb18e4e90d-52e2682744779750b5103bbecf998085.ssl.cf2.rackcdn.com/FileAccess.zip

There is a bug in the supplied library file documentfile 1.0.0. The file documentfile-1.1.0.jar is included (to put it into the programme, go to Project / Add to Project and put it in, then go to the right-hand side of the screen to Project, Target, Android (32 or 64 or both), Libraries and disable documentfile 1.0.0.

It is not designed as an all-singing, all-dancing effort (in fact, for saving/restoring the persisting file access on the android it uses AssignFile, which Dave tells me was retired about the time of Noah’s ark, but at least all of it works.

If it is helpful, enjoy it. If not, feel free to send me brickbats (I prefer bouquets)!

1 Like

Nothing wrong with AssignFile - but then I am just about the only developer in the world who still uses for Loop := 0 to Pred(LoopMax) instead of for Loop := 0 to LoopMax - 1 so perhaps I am not the best person to comment!

I like that, Ian! Use the tools you are familiar with and like, and the error rate is lower than it might be otherwise! (I have found a couple of small bugs corrected since I first put it up - handy to have such things on your phone while you are waiting for people / appointments and things!)