Indy 9
|
TAccessFileEvent = procedure (Sender: TObject; var FileName: String; const PeerInfo: TPeerInfo; var GrantAccess: Boolean; var AStream: TStream; var FreeStreamOnComplete: Boolean) of object;
FileName indicates the name of the file on the server file system.
PeerInfo contain the PeerIp and PeerPort for the client connection performing the file access that generated the event notification.
When GrantAccess is True, the file operation for the event has been is permitted. False indicates that the operation was not permitted or an error has occurred. Update GrantAccess in a TAccessFileEvent event handler to reflect the state of the operation.
AStream contains the data to be written to the local file system as a result of the file operation.
When FreeStreamOnCompleteis True, the TAccessFileEvent event handler should free the stream in AStream.