I was not clear. I wanted to set the path to upload files in specific folders.
SOLVED
B4X:
Dim os As String = GetSystemProperty("os.name", "").ToLowerCase
If os.Contains("linux") Then
dirfolder = "///opt/mydir/mysubdir/"
ELSE
dirfolder = C://MYDIR
End If
Dim out As OutputStream = File.OpenOutput(dirfolder, name, False)