Android Question Using full path for file operations

barx

Well-Known Member
Licensed User
Longtime User
Is it possible to use a full path (including filename) for file operations that expect (Dir, Filename)?

I kind of tested with
B4X:
File.Exists("", Path)
And got a Return value of True.

Just making sure this is a reliable possibility.

Thank you for your work

Sorry for my bad english.
 

Mahares

Expert
Licensed User
Longtime User
I tried the two below variants and it found it each time. I hope this is what you are after:
B4X:
Dim MyFile As String=File.DirRootExternal & "/myfolder/" & "Base_Settings.tab"
If File.Exists("",MyFile) Then
   Msgbox("I found it: " & MyFile,"")
 Else
    Msgbox("not found","")
 End If

B4X:
Dim MyFile As String=  "Base_Settings.tab"
 If File.Exists(File.DirRootExternal & "/myfolder" ,MyFile) Then
   Msgbox("I found it: " & MyFile,"")
 Else
    Msgbox("not found","")
 End If
 
Upvote 0
Top