You find this example project in your Plugins Download as a Xojo project file within the examples folder: /CURL/FTP/CURLS ftp file delete
Class Window1 Inherits Window
Control StaticText1 Inherits Label
ControlInstance StaticText1 Inherits Label
End Control
Control PushButton2 Inherits PushButton
ControlInstance PushButton2 Inherits PushButton
EventHandler Sub Action()
DoUpload
End EventHandler
End Control
Control ListBox1 Inherits ListBox
ControlInstance ListBox1 Inherits ListBox
End Control
Control URL Inherits TextField
ControlInstance URL Inherits TextField
End Control
Control StaticText2 Inherits Label
ControlInstance StaticText2 Inherits Label
End Control
Control Path Inherits TextField
ControlInstance Path Inherits TextField
End Control
Control StaticText3 Inherits Label
ControlInstance StaticText3 Inherits Label
End Control
Private Sub DoUpload()
// prepare
dim e as integer
dim d as new CURLSMBS
d.OptionURL=url.text
d.OptionDirListOnly = True
d.OptionUsername = "test"
d.OptionPassword = "password"
Break // change credentials
dim ws() As String
ws.Append "DELE "+path.Text
d.SetOptionPostQuote(ws)
// run
e=d.Perform
// show result, this is directory listing and debug messages.
listbox1.DeleteAllRows
dim s as string = d.DebugMessages+EndOfLine+d.OutputData
s = ReplaceLineEndings(s, EndOfLine)
dim lines() as string = split(s, EndOfLine)
for each line as string in lines
listbox1.AddRow line
next
listbox1.addrow "Result: "+str(e)
End Sub
End Class
MenuBar MenuBar1
MenuItem UntitledMenu1 = ""
MenuItem FileMenu = "&File"
MenuItem FileQuit = "Quit"
MenuItem UntitledMenu5 = ""
MenuItem EditMenu = "&Edit"
MenuItem EditUndo = "&Undo"
MenuItem UntitledMenu0 = "-"
MenuItem EditCut = "Cu&t"
MenuItem EditCopy = "&Copy"
MenuItem EditPaste = "&Paste"
MenuItem EditClear = "Clear"
MenuItem UntitledMenu4 = ""
MenuItem UntitledMenu3 = ""
MenuItem UntitledMenu2 = ""
End MenuBar
Class App Inherits Application
End Class