on_find_next Event
An override for a directory listing entry request operation.
Syntax
class FTPServerFindNextEventParams(object): @property def connection_id() -> int: ... @property def operation_status() -> int: ... @operation_status.setter def operation_status(value) -> None: ... # In class FTPServer: @property def on_find_next() -> Callable[[FTPServerFindNextEventParams], None]: ... @on_find_next.setter def on_find_next(event_hook: Callable[[FTPServerFindNextEventParams], None]) -> None: ...
Remarks
The class fires this event in a loop after calling on_find_init to request one directory entry from the application.
This event only fires if Action = fraCustom was passed back from on_before_find event. No default listing operation will be performed by the server component.
Inside the handler, pass the entry details to the server component by tuning up the client_file_entry object to contain the details of the requested entry, and committing those details to the component with set_client_file_entry method.
Use the OperationStatus parameter to return the operation result back to the server. After submitting all the directory entries to the component, set OperationStatus to ostEOF to tell the components that no more entries are left.
This event will be followed by on_find_close call which will let you make final adjustments to the returned code.
Set OperationStatus to one of the following values:
ostOk | 1 | |
ostNoSuchFile | 2 | |
ostAccessDenied | 3 | |
ostWriteProtect | 4 | |
ostUnsupported | 5 | |
ostInvalidParameter | 6 | |
ostEOF | 7 |