fgl_download()

Lycia supports transferring files between the client and the server. The  built-in function is used to pass files in the server-to-client direction.

 

Syntax:

fgl_download(server_file, client_file)

 

where:

 

Usage:

The fgl_download() function allows to retrieve a file stored on the server and passes it to the client. Both arguments are required, and can specify the full path as well as the relative one.

 

For example, the following function call may be used to get a copy of a file located on some machine at C:\Docs\Howto.doc and move it to the different location on the user`s machine:

fgl_download("C:\\Docs\\Howto.doc", "Z:\\MyFiles\\Guides\\Howto.doc")

 

'\\' must always be used instead of "\", otherwise, the string is not treated as a path, and the function call takes no effect.

 

 

If the specified file does not exist, file transfer is not performed, and the function returns 0/FALSE. If the operation is performed successfully, the function returns 1/TRUE.

 

The function fgl_download() replaces the function fgl_file_to_client(), retaining the same functionality.

To pass the files from client to server the fgl_upload() function must be used.

 

 


Related topics:

fgl_upload()