wvfileutils.h

00001 /* -*- Mode: C++ -*-
00002  * Worldvisions Weaver Software:
00003  *   Copyright (C) 1997-2005 Net Integration Technologies, Inc.
00004  *
00005  * Various little file functions...
00006  *
00007  */
00008 
00009 #ifndef __WVFILEUTILS_H
00010 #define __WVFILEUTILS_H
00011 
00012 #include "wvstring.h"
00013 #include "wvstringlist.h"
00014 
00022 bool mkdirp(WvStringParm _dir, int create_mode = 0700);
00023 
00029 void rm_rf(WvStringParm _dir);
00030 
00038 bool fcopy(WvStringParm src, WvStringParm dst);
00039 bool fcopy(WvStringParm srcdir, WvStringParm dstdir, WvStringParm relname);
00040 
00046 bool ftouch(WvStringParm file, time_t mtime = 0);
00047 
00056 bool samedate(WvStringParm file1, WvStringParm file2);
00057 bool samedate(WvStringParm dir1, WvStringParm dir2, WvStringParm relname);
00058 
00063 #ifndef _WIN32
00064 bool wvfnmatch(WvStringList &patterns, WvStringParm name, int flags = 0);
00065 #endif
00066 
00070 FILE *wvtmpfile();
00071 
00072 /* Returns a unique filename suitable for a temporary file. Obviously there is
00073  * the caveat that someone else may claim this file name before you open it:
00074  * do not use this routine where that race may be a real concern (this would
00075  * apply only to security-sensitive code)
00076  */
00077 WvString wvtmpfilename(WvStringParm prefix);
00078 
00082 #ifndef _WIN32
00083 int wvchmod(const char *path, mode_t mode);
00084 #endif
00085 
00089 mode_t get_umask();
00090 
00091 #endif // __WVFILEUTILS_H

Generated on Fri Oct 5 18:20:27 2007 for WvStreams by  doxygen 1.5.3