Android Question Creating/Copying files to a hidden folder

Kwame Twum

Active Member
Licensed User
Longtime User
Hello all, I'm having problems creating a file in a hidden folder

I have created two hidden folders at runtime with the following code...
B4X:
 File.MakeDir(File.DirRootExternal,"App1/.channels")  'Created successfully
File.MakeDir(File.DirRootExternal,"App1/.emo")  'Created successfully

I then attempted to put .nomedia files in there... First one worked
B4X:
 File.WriteString(File.DirRootExternal,"App1/.channels/.nomedia","")  'Created successfully

The following failed:
B4X:
 File.WriteString(File.DirRootExternal,"App1/.emo/.nomedia","")  'This line fails

Log
java.io.FileNotFoundException: /storage/emulated/0/App1/.emo/.nomedia: open failed: ENOENT (No such file or directory)..

Observations:
• Issue happens in Rapid Debug mode and persists even in Release mode.

Any help is appreciated, thank you.
 

Kwame Twum

Active Member
Licensed User
Longtime User
Thanks Erel, but code fails here even with
B4X:
File.WriteString(File.DirRootExternal,"App1/.emo/.nomedia","ttt")
gives the same error I posted earlier.

Been wondering if emo is some sort of keyword, lol
 
Upvote 0
Cookies are required to use this site. You must accept them to continue using the site. Learn more…