What's under DirAssets?

boten

Active Member
Licensed User
Longtime User
I created a sub-folder ("sdir") under the Files folder of my project.

In the Files folder there is one file "a.txt"
In the subfolder "sdir" (Files/sdir) there is one file "b.txt"

the stmt:
B4X:
Log(File.ListFiles(File.DirAssets ))

lists the file and sub-folders in Files (including "a.txt" and "sdir")

but the stmt:
B4X:
Log(File.ListFiles(File.DirAssets & "/sdir" ))

produce an error

The log is:
B4X:
** Activity (main) Create, isFirst = true **
(ArrayList) [[B]a.txt[/B], images, [B]sdir[/B], sounds, webkit]

main_activity_create (java line: 210)
java.io.IOException: AssetsDir/sdir is not a folder.

Any way to "reach" files in a sub-folder of Files?

(I know I can add "b.txt" via the files tab of the project, but that really copies the file to the Files folder - not what I want)
 

boten

Active Member
Licensed User
Longtime User
well, both stmts returned false :confused:

B4X:
Log(File.Exists(File.DirAssets,"/sdir/b.txt"))
Log(File.Exists(File.DirAssets,"sdir/b.txt"))
 
Upvote 0
Top