00001
00002
00003
00004
00005
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
00073
00074
00075
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