wvfileutils.h

00001 /* -*- Mode: C++ -*-
00002  * Worldvisions Weaver Software:
00003  *   Copyright (C) 1997-2002 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 
00015 
00023 bool mkdirp(WvStringParm _dir, int create_mode = 0700);
00024 
00030 void rm_rf(WvStringParm _dir);
00031 
00039 bool fcopy(WvStringParm src, WvStringParm dst);
00040 bool fcopy(WvStringParm srcdir, WvStringParm dstdir, WvStringParm relname);
00041 
00042 
00051 bool samedate(WvStringParm file1, WvStringParm file2);
00052 bool samedate(WvStringParm dir1, WvStringParm dir2, WvStringParm relname);
00053 
00058 #ifndef _WIN32
00059 bool wvfnmatch(WvStringList &patterns, WvStringParm name, int flags = 0);
00060 #endif
00061 
00065 FILE *wvtmpfile();
00066 
00067 
00068 /* Returns a unique filename suitable for a temporary file. Obviously there is
00069  * the caveat that someone else may claim this file name before you open it:
00070  * do not use this routine where that race may be a real concern (this would
00071  * apply only to security-sensitive code)
00072  */
00073 WvString wvtmpfilename(WvStringParm prefix);
00074 
00075 
00079 #ifndef _WIN32
00080 int wvchmod(const char *path, mode_t mode);
00081 #endif
00082 
00083 
00087 mode_t get_umask();
00088 
00089 #endif // __WVFILEUTILS_H

Generated on Sun Sep 24 20:10:50 2006 for WvStreams by  doxygen 1.4.7