Check i/o status, Change directory on local machine, Display list of files – HP Integrity NonStop H-Series User Manual

Page 107: Check i/o status change directory on local machine

Advertising
background image

Check I/O Status

The routine FTPio checks whether the I/O associated with the connection has been completed.

#include "ftpexth"
short FTPio(short *hd, long wait, char **buffer,
long *tag)

hd

file number.

wait

<>0,wait indefinitely for this command to.

0 , returns to the caller immediately, regardless of whether or not an I/O completion occurs

buffer

pointer to where the data is returned.

tag

same as tag parameter in AWAITIOX.

The return value is 1 if I/O is completed, 0 if I/O is not completed yet, -1 if there is an error.

Change Directory on Local Machine

The routines FTPlcd and FTPlcd_nw change the directory on a local machine.

NOTE:

FTPlcd and FTPlcd_nw function only when there is a direct connection. You cannot use

them with proxy connections.

#include "ftpexth"
short FTPlcd(short hd, short proxy, char *ldir)
short FTPlcd_nw(short hd, short proxy, char *ldir,
long tag)

hd

file number.

proxy

1 , this command applies to the proxy connection. Do not specify 1. If you do, you will receive
an error 414 (NOT_PROXY) when the call executes.

0 , this command applies to the primary connection.

ldir

local target directory.

tag

parameter to be used for the GUARDIAN no wait operation initiated by FTPlcd_nw.

The return value is -1 if the routine fails. The error number is set accordingly.

Display List of Files

The routines FTPlist and FTPlist_nw return a list of the files matching the specified pattern.

#include "ftpexth"
short FTPlist(short hd, short proxy, char *pattern,
char *buffer, short limit)
short FTPlist_nw(short hd, short proxy,char *pattern,
char *buffer, short limit, long tag)

hd

file number.

API Routines 107

Advertising
This manual is related to the following products: