Rudiments
file.h
1// Copyright (c) 1999-2018 David Muse
2// See the COPYING file for more information
3
4 file(file &f) {};
5 file &operator=(file &f) { return *this; };
6
7 protected:
8 virtual bool lowLevelOpen(const char *name, int32_t flags,
9 mode_t perms, bool useperms);
10
11 private:
12 static bool stat(const char *filename, void *st);
13
14 ssize_t getContents(byte_t **buffer,
15 size_t *buffersize,
16 bool terminate);
17
18 bool lock(int32_t method, int16_t type, int16_t whence,
19 off64_t start, off64_t len);
20 bool checkLock(int16_t type,
21 int16_t whence,
22 off64_t start,
23 off64_t len,
24 int16_t *conftype,
25 int16_t *confwhence,
26 off64_t *confstart,
27 off64_t *conflen);
28 bool unlock(int16_t whence,
29 off64_t start, off64_t len);
30
31 bool posixFadvise(off64_t offset, off64_t len,
32 int32_t advice);
33
34 static int64_t pathConf(const char *path, int32_t name);
35 int64_t fpathConf(int32_t name);
36
37 fileprivate *pvt;
Definition file.h:19