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 
00018 int wvmkdir(WvStringParm _dir, int create_mode = 0700);
00019 
00027 int mkdirp(WvStringParm _dir, int create_mode = 0700);
00028 
00034 void rm_rf(WvStringParm _dir);
00035 
00043 bool fcopy(WvStringParm src, WvStringParm dst);
00044 bool fcopy(WvStringParm srcdir, WvStringParm dstdir, WvStringParm relname);
00045 
00051 bool ftouch(WvStringParm file, time_t mtime = 0);
00052 
00061 bool samedate(WvStringParm file1, WvStringParm file2);
00062 bool samedate(WvStringParm dir1, WvStringParm dir2, WvStringParm relname);
00063 
00068 #ifndef _WIN32
00069 bool wvfnmatch(WvStringList &patterns, WvStringParm name, int flags = 0);
00070 #endif
00071 
00075 FILE *wvtmpfile();
00076 
00077 /* Returns a unique filename suitable for a temporary file. Obviously there is
00078  * the caveat that someone else may claim this file name before you open it:
00079  * do not use this routine where that race may be a real concern (this would
00080  * apply only to security-sensitive code)
00081  */
00082 WvString wvtmpfilename(WvStringParm prefix);
00083 
00084 #ifndef _WIN32
00085 
00088 int wvchmod(const char *path, mode_t mode);
00089 #endif
00090 
00094 #ifndef _WIN32
00095 mode_t get_umask();
00096 #endif
00097 
00101 void wvdelay(int msec_delay);
00102 
00103 #endif // __WVFILEUTILS_H

Generated on Thu Jan 24 16:50:56 2008 for WvStreams by  doxygen 1.5.4