I am using the following code to see if a certain folder exists on my servers FTP folder.
If the Folder (named phone IMEI) is not present, I create the folder.
However, I would like to check/create the new folder in any drive of my server and NOT only in the FTP folder.
Is it possible to use OkHTTP to check whether the folder exists and create the folder if not exists.
B4X:
Sub FTP_ListCompleted (ServerPath As String, Success As Boolean, Folders() As FTPEntry, Files() As FTPEntry)
Dim MyFolderList As List
Dim MyFoldersString As String
Dim MyPos As Int
MyFolderList.Initialize
Log(ServerPath)
If Success = False Then
Log(LastException)
Else
For i = 0 To Folders.Length - 1
Log(Folders(i).Name)
MyFolderList.Add(Folders(i).Name)
MyFoldersString = sf.ListToString(MyFolderList, False, False)
MyPos = sf.InString(MyFoldersString, MyIMEI)
LogColor(MyPos, Colors.Blue)
If MyPos < 0 Then
FTP.SendCommand("MKD", MyIMEI)
LogColor("Folder Created: " & MyIMEI, Colors.Blue)
End If
Next
' For i = 0 To Files.Length - 1
' Log(Files(i).Name )'& ", " & Files(i).Size & ", " & DateTime.Date(Files(i).Timestamp))
' Next
End If
End Sub
However, I would like to check/create the new folder in any drive of my server and NOT only in the FTP folder.
Is it possible to use OkHTTP to check whether the folder exists and create the folder if not exists.