rpmio/tfts.c File Reference

#include "system.h"
#include <fts.h>
#include <rpmio_internal.h>
#include <rpmmacro.h>
#include <rpmmessages.h>
#include <popt.h>
#include "debug.h"

Go to the source code of this file.

Defines

#define HTTPSPATH   "https://localhost/rawhide/"
#define HTTPPATH   "http://localhost/rawhide/"
#define FTPPATH   "ftp://localhost/pub/rawhide/packages/test"
#define DIRPATH   "/var/ftp/pub/rawhide/packages/test"

Functions

static const char * ftsInfoStr (int fts_info)
static int ftsPrint (FTS *ftsp, FTSENT *fts)
static void ftsWalk (const char *path)
int main (int argc, const char *argv[])

Variables

static int _fts_debug = 0
static char * httpspath = "https://localhost/rawhide/"
static char * httppath = "http://localhost/rawhide/"
static char * ftppath = "ftp://localhost/pub/rawhide/packages/test"
static char * dirpath = "/var/ftp/pub/rawhide/packages/test"
static int ndirs = 0
static int nfiles = 0
static int indent = 2
static const char * ftsInfoStrings []
static int ftsOpts = 0
static struct poptOption optionsTable []


Define Documentation

#define DIRPATH   "/var/ftp/pub/rawhide/packages/test"

Definition at line 22 of file tfts.c.

#define FTPPATH   "ftp://localhost/pub/rawhide/packages/test"

Definition at line 21 of file tfts.c.

#define HTTPPATH   "http://localhost/rawhide/"

Definition at line 19 of file tfts.c.

#define HTTPSPATH   "https://localhost/rawhide/"

Definition at line 18 of file tfts.c.


Function Documentation

static const char* ftsInfoStr ( int  fts_info  )  [static]

Definition at line 51 of file tfts.c.

References ftsInfoStrings.

static int ftsPrint ( FTS ftsp,
FTSENT fts 
) [static]

Definition at line 57 of file tfts.c.

References _fts_debug, FTS_D, FTS_DC, FTS_DEFAULT, FTS_DNR, FTS_DOT, FTS_DP, FTS_ERR, FTS_F, _ftsent::fts_info, FTS_INIT, _ftsent::fts_level, _ftsent::fts_name, FTS_NS, FTS_NSOK, FTS_SL, FTS_SLNONE, FTS_W, ftsInfoStr(), indent, ndirs, and nfiles.

Referenced by ftsWalk(), and main().

static void ftsWalk ( const char *  path  )  [static]

Definition at line 95 of file tfts.c.

References Fts_close(), Fts_open(), Fts_read(), ftsOpts, ftsPrint(), ftsSet, ndirs, and nfiles.

Referenced by main().

int main ( int  argc,
const char *  argv[] 
)

Definition at line 147 of file tfts.c.

References _av_debug, _dav_debug, _ftp_debug, dirpath, ftppath, FTS_COMFOLLOW, FTS_LOGICAL, FTS_NOSTAT, ftsOpts, ftsWalk(), httppath, httpspath, optionsTable, rpmIncreaseVerbosity, and urlFreeCache().


Variable Documentation

int _fts_debug = 0 [static]

Definition at line 12 of file tfts.c.

Referenced by ftsPrint().

char* dirpath = "/var/ftp/pub/rawhide/packages/test" [static]

Definition at line 26 of file tfts.c.

char* ftppath = "ftp://localhost/pub/rawhide/packages/test" [static]

Definition at line 25 of file tfts.c.

const char* ftsInfoStrings[] [static]

Initial value:

 {
    "UNKNOWN",
    "D",
    "DC",
    "DEFAULT",
    "DNR",
    "DOT",
    "DP",
    "ERR",
    "F",
    "INIT",
    "NS",
    "NSOK",
    "SL",
    "SLNONE",
    "W",
}

Definition at line 33 of file tfts.c.

int ftsOpts = 0 [static]

Definition at line 93 of file tfts.c.

char* httppath = "http://localhost/rawhide/" [static]

Definition at line 24 of file tfts.c.

char* httpspath = "https://localhost/rawhide/" [static]

Definition at line 23 of file tfts.c.

Referenced by main().

int indent = 2 [static]

Definition at line 31 of file tfts.c.

int ndirs = 0 [static]

Definition at line 28 of file tfts.c.

Referenced by ftsPrint(), and ftsWalk().

int nfiles = 0 [static]

Definition at line 29 of file tfts.c.

Referenced by ftsPrint(), and ftsWalk().

struct poptOption optionsTable[] [static]

Initial value:

 {
 { "ftsdebug", 'd', POPT_ARG_VAL,       &_fts_debug, -1,        NULL, NULL },

 { "comfollow", '\0', POPT_BIT_SET,     &ftsOpts, FTS_COMFOLLOW,
         "follow command line symlinks" , NULL },
 { "logical", '\0', POPT_BIT_SET,       &ftsOpts, FTS_LOGICAL,
         "logical walk" , NULL },
 { "nochdir", '\0', POPT_BIT_SET,       &ftsOpts, FTS_NOCHDIR,
         "don't change directories" , NULL },
 { "nostat", '\0', POPT_BIT_SET,        &ftsOpts, FTS_NOSTAT,
         "don't get stat info" , NULL },
 { "physical", '\0', POPT_BIT_SET,      &ftsOpts, FTS_PHYSICAL,
         "physical walk" , NULL },
 { "seedot", '\0', POPT_BIT_SET,        &ftsOpts, FTS_SEEDOT,
         "return dot and dot-dot" , NULL },
 { "xdev", '\0', POPT_BIT_SET,          &ftsOpts, FTS_XDEV,
         "don't cross devices" , NULL },
 { "whiteout", '\0', POPT_BIT_SET,      &ftsOpts, FTS_WHITEOUT,
         "return whiteout information" , NULL },

 { "ftpdebug", '\0', POPT_ARG_VAL|POPT_ARGFLAG_DOC_HIDDEN, &_ftp_debug, -1,
         "debug protocol data stream" , NULL},
 { "rpmiodebug", '\0', POPT_ARG_VAL|POPT_ARGFLAG_DOC_HIDDEN, &_rpmio_debug, -1,
         "debug rpmio I/O" , NULL},
 { "urldebug", '\0', POPT_ARG_VAL|POPT_ARGFLAG_DOC_HIDDEN, &_url_debug, -1,
         "debug URL cache handling" , NULL},
 { "verbose", 'v', 0, 0, 'v',                           NULL, NULL },
  POPT_AUTOHELP
  POPT_TABLEEND
}

Definition at line 115 of file tfts.c.


Generated on Mon Mar 5 14:31:04 2007 for rpm by  doxygen 1.5.1