BeforeRenameFile Event
Notifies about an incoming file rename request.
Syntax
ANSI (Cross Platform) virtual int FireBeforeRenameFile(FTPServerBeforeRenameFileEventParams *e);
typedef struct {
int64 ConnectionID;
const char *OldPath;
const char *NewPath;
int Action; int reserved; } FTPServerBeforeRenameFileEventParams; Unicode (Windows) virtual INT FireBeforeRenameFile(FTPServerBeforeRenameFileEventParams *e);
typedef struct {
LONG64 ConnectionID;
LPCWSTR OldPath;
LPCWSTR NewPath;
INT Action; INT reserved; } FTPServerBeforeRenameFileEventParams;
- (void)onBeforeRenameFile:(long long)connectionID :(NSString*)oldPath :(NSString*)newPath :(int*)action;
#define EID_FTPSERVER_BEFORERENAMEFILE 15 virtual INT SECUREBLACKBOX_CALL FireBeforeRenameFile(LONG64 &lConnectionID, LPSTR &lpszOldPath, LPSTR &lpszNewPath, INT &iAction);
Remarks
The class fires this event to notify the application about a received file rename request. ConnectionID identifies the connected client.
Set Action to fraAuto to let the server handle the request automatically, or to fraCustom to handle the request in your code. Subscribe to RenameFile to be notified when to perform the request. It is the RenameFile event handler where you should perform the overridden action.
Upon completion of the request, either in manual or override mode, the AfterRenameFile event will be fired.
Choose Action as one of the following values:
fraAuto | 1 | Handle the requested action automatically by the server |
fraCustom | 2 | Override the action using the user code logic |
fraAbort | 3 | Abort the requested action |