I have looked at a lot of posts and cannot understand what is required
What I require is to be able to create/read/write/ and DELETE files on the SDCARD from which ever Activity and whichever Thread within my program.
I have been creating files using:-
File newFile = new File ("/sdcard/Milk/wk200949");
FileOutputStream fos = new FileOutputStream(newFile);
fos.write(newarray, 0, fsize);
which works fine but the file is created with -rwxrwxrwx permissions so I cannot use the deleteFile(filename) routine to delete it.
If I open the file using
FileOutputStream fos = openFileOutput("/sdcard/Milk/wk200949", MODE_PRIVATE);
then it fails because the file does not exist! NO IT FAILS WITH INVALIDARGUMENT as you can't have paths in the filename
However, Dispite having the file permission -rwxx.... the file can be deleted using:-
Thanks Mark Murphy in a long gone thread.
Which just goes to show "If you ask the wrong question .... You don't necessarily get an answer!!"