summaryrefslogtreecommitdiffstats
path: root/lib/libfetch/fetch.3
diff options
context:
space:
mode:
authordes <des@FreeBSD.org>1998-12-21 19:41:50 +0000
committerdes <des@FreeBSD.org>1998-12-21 19:41:50 +0000
commit9eb60712989a0fae7fcc9dede444f5a2a2257b3e (patch)
tree39586fde93684776babc1e5c17c3e6d030d1e7ff /lib/libfetch/fetch.3
parent5dc2c17026e7f757a215f4d72924dfe769472532 (diff)
downloadFreeBSD-src-9eb60712989a0fae7fcc9dede444f5a2a2257b3e.zip
FreeBSD-src-9eb60712989a0fae7fcc9dede444f5a2a2257b3e.tar.gz
Implement and document file list retrieval.
Diffstat (limited to 'lib/libfetch/fetch.3')
-rw-r--r--lib/libfetch/fetch.343
1 files changed, 41 insertions, 2 deletions
diff --git a/lib/libfetch/fetch.3 b/lib/libfetch/fetch.3
index 0c6aa7d..16dec55 100644
--- a/lib/libfetch/fetch.3
+++ b/lib/libfetch/fetch.3
@@ -22,7 +22,7 @@
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
-.\" $Id: fetch.3,v 1.5 1998/12/16 10:24:54 des Exp $
+.\" $Id: fetch.3,v 1.6 1998/12/16 15:29:03 des Exp $
.\"
.Dd July 1, 1998
.Dt FETCH 3
@@ -31,19 +31,24 @@
.Nm fetchGetURL ,
.Nm fetchPutURL ,
.Nm fetchStatURL ,
+.Nm fetchListURL ,
.Nm fetchParseURL ,
.Nm fetchGet ,
.Nm fetchPut ,
.Nm fetchStat ,
+.Nm fetchList ,
.Nm fetchGetFile ,
.Nm fetchPutFile ,
.Nm fetchStatFile ,
+.Nm fetchListFile ,
.Nm fetchGetHTTP ,
.Nm fetchPutHTTP ,
.Nm fetchStatHTTP ,
+.Nm fetchListHTTP ,
.Nm fetchGetFTP ,
.Nm fetchPutFTP
.Nm fetchStatFTP
+.Nm fetchListFTP ,
.Nd file transfer library
.Sh SYNOPSIS
.Fd #include <sys/param.h>
@@ -55,6 +60,8 @@
.Fn fetchPutURL "char *URL" "char *flags"
.Ft int
.Fn fetchStatURL "char *URL" "struct url_stat *us" "char *flags"
+.Ft struct url_ent *
+.Fn fetchListURL "char *URL" "char *flags"
.Ft struct url *
.Fn fetchParseURL "char *URL" "char *flags"
.Ft FILE *
@@ -63,24 +70,32 @@
.Fn fetchPut "struct url *URL" "char *flags"
.Ft int
.Fn fetchStat "struct url *URL" "struct url_stat *us" "char *flags"
+.Ft struct url_ent *
+.Fn fetchList "struct url *" "char *flags"
.Ft FILE *
.Fn fetchGetFile "struct url *u" "char *flags"
.Ft FILE *
.Fn fetchPutFile "struct url *u" "char *flags"
.Ft int
.Fn fetchStatFile "struct url *URL" "struct url_stat *us" "char *flags"
+.Ft struct url_ent *
+.Fn fetchListFile "struct url *" "char *flags"
.Ft FILE *
.Fn fetchGetHTTP "struct url *u" "char *flags"
.Ft FILE *
.Fn fetchPutHTTP "struct url *u" "char *flags"
.Ft int
.Fn fetchStatHTTP "struct url *URL" "struct url_stat *us" "char *flags"
+.Ft struct url_ent *
+.Fn fetchListHTTP "struct url *" "char *flags"
.Ft FILE *
.Fn fetchGetFTP "struct url *u" "char *flags"
.Ft FILE *
.Fn fetchPutFTP "struct url *u" "char *flags"
.Ft int
.Fn fetchStatFTP "struct url *URL" "struct url_stat *us" "char *flags"
+.Ft struct url_ent *
+.Fn fetchListFTP "struct url *" "char *flags"
.Sh DESCRIPTION
.Pp
These functions implement a high-level library for retrieving and
@@ -113,6 +128,28 @@ struct url_stat {
};
.Ed
.Pp
+.Fn fetchListURL
+attempts to list the contents of the directory pointed to by the URL
+provided. If successful, it returns a malloced array of
+.Fa url_ent
+structures. The
+.Fa url_ent
+structure is defined as follows in
+.Aq Pa fetch.h :
+.Bd -literal
+struct url_ent {
+ char name[MAXPATHLEN];
+ struct url_stat stat;
+};
+.Ed
+.Pp
+The list is terminated by an entry with an empty name.
+.Pp
+The pointer returned by
+.Fn fetchListURL
+should be freed using
+.Fn free .
+.Pp
.Fn fetchParseURL
takes a URL in the form of a null-terminated string and splits it into
its components function according to the Common Internet Scheme Syntax
@@ -331,7 +368,9 @@ This manual page was written by
Some parts of the library are not yet implemented. The most notable
examples of this are
.Fn fetchPutHTTP ,
-.Fn fetchStatHTTP
+.Fn fetchStatHTTP ,
+.Fn fetchListHTTP ,
+.Fn fetchListFTP ,
and FTP proxy support.
.Pp
There's no way to select a proxy at run-time other than setting the
OpenPOWER on IntegriCloud