Back to product page

FtpActions enumeration

FtpActions enumeration is used with events. Some events fire to allow you to restrict certain actions done by the client.


In such cases, you would have Action argument provided with the event, where you could set Action = Allow to allow the action, or Action = Deny to deny the action. SilentAlow and SilentDeny are exactly the same as Allow or Deny, except wodFTPServer does not send any response to the client (valid only if FTP and FTPS protocols!), but it leaves this for you to do using User.Send method.

Typical sample is Connecting event - when user tries to connect to the server, you can check his IP address and determine if you will allow him to proceed with connecting, or will immediately reject his access. For example, below sample will allow connections only from localhost:
Private Sub FtpD_Connecting(ByVal User As wodFTPDComLib.IFtpUser, Action As wodFTPDComLib.FtpActions)
     If User.RemoteIP <> "" Then Action = Deny
End Sub


Constant Value Description
Deny0 Deny execution of the action.
Allow 1 Allow to execute action.
SilentDeny2 Silently deny execution of the action.
SilentAllow 3 Silently allow to execute action.