Android Question Correct syntax for use in File.IsDirectory

Gavin

Member
Licensed User
Longtime User
Screen.jpg


Above is a rough screen capture showing Directories on my Nexus7. The directory HtmlHelpFiles and the sub directory BlankSudoku were add, one could say, the conventional way on my Win7 PC.
After creating my Help File with HelpScribble and Exporting to Web Help, I copied the files to the above sub directory using my PC. Then, in my Android Project, I used the following code to display the help file and it works.
B4X:
helpfile.LoadURL("file:///storage/sdcard0/HtmlHelpFiles/BlankSudoku/blanksudokuweb.html")
The problem I am having is figuring out the Correct Syntax to use to find this particular directory. ("file:///storage/sdcard0/HtmlHelpFiles/BlankSudoku").
If File.IsDirectory (File.DirInternal,"storage"&"sdcard0"&"HtmlHelpFiles"&"BlankSudoku") = False
is incorrect. What I and aiming for is to allow users to download help files to the "Download" directory shown above, (every device seems to have this directory) copying or moving these files files to a different directory then using the above code (or similar) display the help file. It is incorrect to expect users to create a directory, then download files to this directory. The programmer should handle this.
I still have a lot to learn.
Thank you
Gavin
 
Top