Indy 9
TAccessFileEvent
See Also, Unit: IdTrivialFTPServer
Specifies an event type for reading or writing to a file on the server.
TAccessFileEvent = procedure (Sender: TObject; var FileName: String; const PeerInfo: TPeerInfo; var GrantAccess: Boolean; var AStream: TStream; var FreeStreamOnComplete: Boolean) of object;
Unit
IdTrivialFTPServer
Parameters
AStream
Contains data to be written to the local file system.
FileName
File name on the server file system.
FreeStreamOnComplete
Indicates that the Stream should be freed.
GrantAccess
Indicates that the file operation is permitted.
PeerInfo
Information about the client connection.
Sender
Trivial FTP server generating the event.
Description
TAccessFileEvent is an event type that signalled when a Trivial FTP server needs to access the contents of a file stored on the local file system on the server.

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.


Created with Doc-O-Matic 2 donated to Project JEDI. Commercial license available from the Doc-O-Matic site.