fsFileAppend

Adds additional content to the end of server file.

Syntax:

fsFileAppend( client-handle, local-file, file-offset, server-file [, create-directories] )

Parameters:

(s) client-handle: FTPS extender client handle.

(s) local-file: name of the local file (optionally with path) to append from.

(i) file-offset: zero-based offset in the local-file to start appending from.

(s) server-file: name of server file (with path as needed) to append to.

(i) create-directory: (optional) @True to create a non-existent directory preceding the file name in remote-file path.

Returns:

(i)@True(1) on success

The fsFileAppend function adds local data to the end of a server file. You add either part or all the file local file depending on the value of the file-offset parameter..

 

client-handle

FTPS extender client handle obtain by a call to the fsClientInit function.

 

local-file

Use this parameter to indicated the source file to append from.

 

file-offset

Pass the zero based file offset of the local-file to begin appending from. The remove-file receives the contents of local-file staring at the offset to the end of file. Include any necessary path information in this parameter.

 

server-file 

Use this parameter to specify the FTP server file you wish to append to. Include any necessary server path information to the targeted file so that the correct file receives the uploaded data. If the server file does not exist it will be created depending on any path information in the parameter and the value of the create-directory parameter.

 

create-directory

Set this optional parameter to @True(1) and the function creates the directory immediately preceding  the file name contained in the remote-file parameter's path. Setting the parameter to  @False(0) causes the function to error if any of the directories in the path contained in remote-file parameter does not exist. If the parameter is not specified, @False is assumed.

 

Note: The server user account associated with client-handle must have directory creation privileges when directory creation is required and create-directory is set to @True..

Example:
  AddExtender('ilcfs44i.dll',0,'ilcfs64i.dll')
  host = 'test.example.com'
  port = 21
  user = 'demo'
  pswd  = 'password'
  
  ; Create a client
  client = fsClientInit(host, port, user, pswd)
  
  ; Append entire local file to server file
  ServFile = 'CustData/Customers.csv'
  LocFile = 'ExampleFiles\NewCustomers.csv'
  Offset = 0   
  list = fsFileAppend(client, LocFile, Offset, ServFile)
  
  ; Disconnect and remove
  fsClientDelete(client)
See Also:

fsClientInit, fsFileInfo, fsFilePut