Topic Path: Symbol Reference > Classes > TIdFTP Class > TIdFTP Methods > Allocate Method
TIdFTP.Allocate Method

Pre-allocates space on a FTP server before you upload a file.

procedure Allocate(
    AAllocateBytes: Integer
The number of bytes that should be allocated 

Allocate is a procedure that pre-allocates space on a FTP server before you upload a file using the Put method. 

It is recommend to use this method before attempting to upload a file. Some servers may require this command while others do not. If a server does not require this command, it should treat this command as if the TIdFTP.Noop method has been called. 

Allocate sends the FTP ALLO command using the value in AAllocateBytes as an argument. Allocate expects the numeric response code 200 from the FTP server, and raises a protocol exception when any other value is encountered.

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