%FIO_ServerSetFile function


Function
The function %FIO_ServerSetFile transfers files from local computer (computer where the process D2000 Event or D2000 HI is running) to server. 
Declaration
BOOL %FIO_ServerSetFile(
   TEXT in srcFile,
   TEXT in dstFile
 )
Parameters
srcFileTransferred (copied) file - complete path.
dstFileTarget location of copied file - complete path with file name.


Description
The function reads file srcFile and sends its content to process D2000 Server. This process saves the received data to temporary file dstFile which name is extended with letters "tc" at end.

After transferring of all data a temporary file is renamed to prefer target file.
Success of action can be found by return value of function. Existing file dstFile is rewritten by function.

Maximum size of transferred file is 1GB.

Usage of function: when it is necessary to transfer files from local computer to computer which process D2000 Server is running on. This transfer is done by active picture.

Timestamps
If local computer uses platform Win32 the function copies (remains) also timestamps (create time, access time, modify time).
If local computer uses target platform Linux or OpenVMS the function does not modify timestamps.
If local computer uses source platform Linux or OpenVMS the function is able to identify only timestamp - modify time.
Return value
@TRUE - file was transferred,
@FALSE - function failed (file does not exist, unable to rewrite or create file dstFile, or size of srcFile is higher than 1 GB)
Example
 BOOL _bOK
 
 _bOK := %FIO_ServerSetFile("c:\reports\rep1.xls", "c:\appldata\reports\rep1.xls") 
Napíšte komentár