Looking at this post:
I tried:
But Error:
This is apparent:
How can I list the files in a folder "books" that I have created inside the assets folder?File.ListFiles doesn't work with subfolders inside the assets folder.
I tried:
B4X:
Dim mylist As List = File.ListFiles(File.DirAssets & "books")
B4X:
java.io.IOException: AssetsDirbooks is not a folder.
at anywheresoftware.b4a.objects.streams.File.ListFiles(File.java:158)
at java.lang.reflect.Method.invoke(Native Method)
at java.lang.reflect.Method.invoke(Method.java:372)
at anywheresoftware.b4a.shell.Shell.runMethod(Shell.java:708)
at anywheresoftware.b4a.shell.Shell.raiseEventImpl(Shell.java:337)
at anywheresoftware.b4a.shell.Shell.raiseEvent(Shell.java:247)
at java.lang.reflect.Method.invoke(Native Method)
at java.lang.reflect.Method.invoke(Method.java:372)
at anywheresoftware.b4a.ShellBA.raiseEvent2(ShellBA.java:134)
at JHS.SkyTest.main.afterFirstLayout(main.java:102)
at JHS.SkyTest.main.access$000(main.java:17)
at JHS.SkyTest.main$WaitForLayout.run(main.java:80)
at android.os.Handler.handleCallback(Handler.java:815)
at android.os.Handler.dispatchMessage(Handler.java:104)
at android.os.Looper.loop(Looper.java:194)
at android.app.ActivityThread.main(ActivityThread.java:5631)
at java.lang.reflect.Method.invoke(Native Method)
at java.lang.reflect.Method.invoke(Method.java:372)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:959)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:754)