Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Namespace Members | Class Members | File Members | Related Pages

fileutils.h File Reference

#include "wvstring.h"
#include "wvstringlist.h"

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

bool mkdirp (WvStringParm _dir, int create_mode=0700)
 Create a directory and any subdirectories required along the way.

bool fcopy (WvStringParm src, WvStringParm dst)
 Copy from src to dst preserving permissions and time stamp.

bool fcopy (WvStringParm srcdir, WvStringParm dstdir, WvStringParm relname)
bool samedate (WvStringParm file1, WvStringParm file2)
 Check whether two files have the same date/time stamp.

bool samedate (WvStringParm dir1, WvStringParm dir2, WvStringParm relname)
bool wvfnmatch (WvStringList &patterns, WvStringParm name, int flags=0)
 Runs fnmatch against everything in the patterns list.


Function Documentation

bool fcopy WvStringParm  srcdir,
WvStringParm  dstdir,
WvStringParm  relname
 

Definition at line 76 of file fileutils.cc.

References WvStringParm.

bool fcopy WvStringParm  src,
WvStringParm  dst
 

Copy from src to dst preserving permissions and time stamp.

This does not preserve ownership, however.

Two versions of this are provided. One for giving two filenames/paths, and another for giving two starting directories and a relative path from there.

Definition at line 41 of file fileutils.cc.

bool mkdirp WvStringParm  _dir,
int  create_mode = 0700
 

Create a directory and any subdirectories required along the way.

(Equivalent to mkdir -p).

The default permissions on created directories is 0700, but this can be changed at will.

Definition at line 16 of file fileutils.cc.

References WvFastString::cstr(), WvString::edit(), and WvStringParm.

bool samedate WvStringParm  dir1,
WvStringParm  dir2,
WvStringParm  relname
 

Definition at line 98 of file fileutils.cc.

References WvStringParm.

bool samedate WvStringParm  file1,
WvStringParm  file2
 

Check whether two files have the same date/time stamp.

This can be used as a quick check whether files are unchanged / the same, though obviously it doesn't verify that they are indeed the same file.

Two versions are provided, one for giving two files, and another for giving two starting directories and a relative path from there.

Definition at line 83 of file fileutils.cc.

bool wvfnmatch WvStringList patterns,
WvStringParm  name,
int  flags = 0
 

Runs fnmatch against everything in the patterns list.

We also interpret .cvsignore-style '!' patterns, which makes us very fancy.

Definition at line 107 of file fileutils.cc.

References WvStringParm.


Generated on Sat Mar 13 14:56:04 2004 for WvStreams by doxygen 1.3.6-20040222