Topic Path: Symbol Reference > Types > TAccessFileEvent Type
TAccessFileEvent Type

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;
Trivial FTP server generating the event.
File name on the server file system.
Information about the client connection.
Indicates that the file operation is permitted.
Contains data to be written to the local file system.
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.

Copyright 1993-2006, Chad Z. Hower (aka Kudzu) and the Indy Pit Crew. All rights reserved.
Post feedback to the Indy Docs Newsgroup.