WvStreams
include/wvfileutils.h
1/* -*- Mode: C++ -*-
2 * Worldvisions Weaver Software:
3 * Copyright (C) 1997-2005 Net Integration Technologies, Inc.
4 *
5 * Various little file functions...
6 *
7 */
8
9#ifndef __WVFILEUTILS_H
10#define __WVFILEUTILS_H
11
12#include "wvstring.h"
13#include "wvstringlist.h"
14
18int wvmkdir(WvStringParm _dir, int create_mode = 0700);
19
27int mkdirp(WvStringParm _dir, int create_mode = 0700);
28
34void rm_rf(WvStringParm _dir);
35
43bool fcopy(WvStringParm src, WvStringParm dst);
44bool fcopy(WvStringParm srcdir, WvStringParm dstdir, WvStringParm relname);
45
51bool ftouch(WvStringParm file, time_t mtime = 0);
52
57WvString wvreadlink(WvStringParm path);
58
67bool samedate(WvStringParm file1, WvStringParm file2);
68bool samedate(WvStringParm dir1, WvStringParm dir2, WvStringParm relname);
69
74#ifndef _WIN32
75bool wvfnmatch(WvStringList &patterns, WvStringParm name, int flags = 0);
76#endif
77
81FILE *wvtmpfile();
82
83/* Returns a unique filename suitable for a temporary file. Obviously there is
84 * the caveat that someone else may claim this file name before you open it:
85 * do not use this routine where that race may be a real concern (this would
86 * apply only to security-sensitive code)
87 */
88WvString wvtmpfilename(WvStringParm prefix);
89
90#ifndef _WIN32
94int wvchmod(const char *path, mode_t mode);
95#endif
96
100#ifndef _WIN32
101mode_t get_umask();
102#endif
103
104#endif // __WVFILEUTILS_H
A WvFastString acts exactly like a WvString, but can take (const char *) strings without needing to a...
This is a WvList of WvStrings, and is a really handy way to parse strings.
WvString is an implementation of a simple and efficient printable-string class.