Internet Direct (Indy)
|
Retrieves a file from the remote FSP host.
procedure Get( const ASourceFile: string; const ADestFile: string; const ACanOverwrite: boolean = false; AResume: Boolean = false ); overload;
Parameters |
Description |
ASourceFile |
File name on the remote FSP host. |
ADestFile |
File name on the local file system. |
ACanOverwrite |
File can be overwritten on the local file system. The default value is false. |
AResume |
The operation can be resumed from its current position. The default value is false. |
Get is an overloaded procedure used to retreive the file specified in ASourceFile from the remote FSP host.
ADestFile indicates the path and file name to use when storing the file on the local file system.
ACanOverwrite indicates if the file can be overwritten on the local file system. The default value is false.
AResume indicates if the retrieval operation can be resumed from its current position (based on the exisiting contents of the local file in ADestFile). The default value is false.
Values in ACanOverwrite and AResume determine if an existing file with the name specififed in ADestFile is deleted prior to retriveing the specified file.
Get constructs the TIdFSPPacket instance required in the FSP protocol request using the maximum buffer size indicated by the ClientMaxPacketSize and ServerMaxPacketSize properties (including the required 12-byte header).
Get creates an instance of a TIdStream descendant used internally to capture the content retrieved for the requested file. The stream will be a TFileCreateStream instance when file content is overwritten and not resumed. The stream will be a TAppendFileStream instance when file content is not overwritten and resumed from its current position.
Get can raise an EIdFSPFileAlreadyExists exception ACanOverwrite and AResume both contain the value True.
Get calls the overloaded variant of the Get method using the internal TIdStream instance. The stream instance is freed prior to exiting from the method.
Use Put to store a file found on the local file system to a specific path on the remote FSP host.
Exceptions |
Description |
Raised with the message RSDestinationFileAlreadyExists. |
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. |