beautypg.com

B&B Electronics VFG3000 - Manual User Manual

Page 263

background image

F

UNCTION

R

EFERENCE

F

TP

G

ET

F

ILE

(

SERVER

,

LOC

,

REM

,

DELETE

)

R

EVISION

1

P

AGE

247

F

TP

G

ET

F

ILE

(

SERVER

,

LOC

,

REM

,

DELETE

)

A

RGUMENT

T

YPE

D

ESCRIPTION

server

int

FTP connection number, always 0

loc

cstring

Local file name on the CompactFlash card

rem

cstring

Remote file name on the FTP server

delete

int

If true, the source will be deleted after the transfer,
otherwise, it will remain on the source disk.

D

ESCRIPTION

This function will transfer the defined file from the FTP server to the Gateway’s
CompactFlash card. It will return true if the transfer is successful, false otherwise. The source
and destination file name can be different. The remote path is relative to the FTP server
setting root path (See Synchronization Manager for details).

F

UNCTION

T

YPE

This function is passive.

R

ETURN

T

YPE

int.

E

XAMPLE

Success = FtpGetFile(0, “/Recipes.csv”, “/Recipes/Rec001.csv”, 0);

In this example, the file Recipes.csv will be transferred from the FTP server to the
CompactFlash Card. The original file will not be deleted from the PC server.