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: TIdStream; var FreeStreamOnComplete: Boolean) of object;
Parameters |
Description |
Sender |
Trivial FTP server generating the event. |
FileName |
File name on the server file system. |
PeerInfo |
Information about the client connection. |
GrantAccess |
Indicates that the file operation is permitted. |
AStream |
Contains data to be written to the local file system. |
FreeStreamOnComplete |
Indicates that the Stream should be freed. |
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.
Internet Direct (Indy) version 10.1.5
Copyright © 1993-2006, Chad Z. Hower (aka Kudzu) and the Indy Pit Crew. All rights reserved. Website http://www.indyproject.org. Post feedback to the Indy Documentation newsgroup. |