2 * Worldvisions Weaver Software:
3 * Copyright (C) 1997-2002 Net Integration Technologies, Inc.
5 * Test program for WvDirIter. Takes a directory on the command line, and
6 * prints everything it sees.
10 #define __STDC_FORMAT_MACROS
12 #include <sys/types.h>
14 #include "wvdiriter.h"
16 int main( int argc
, char * argv
[] )
17 /*********************************/
21 bool skip_mounts
= false;
23 for( int i
=1; i
<argc
; i
++ ) {
24 if( !strcmp( argv
[i
], "-R" ) )
26 else if ( !strcmp( argv
[i
], "-S" ) )
33 fprintf( stderr
, "Usage: %s [-R] [-S] directory\n", argv
[0] );
37 WvDirIter
i( dirname
, recurse
, skip_mounts
);
38 for( i
.rewind(); i
.next(); ) {
39 printf( "%s -- (filename = [%s]) -- mode %u -- size %" PRIu64
"\n",
40 (const char *) i
->fullname
, i
->name
.cstr(), i
->st_mode
,
41 uint64_t(i
->st_size
) );