]>
Commit | Line | Data |
---|---|---|
212380e3 | 1 | Overview of the file management subsystem |
2 | Adrian Chadd <adrian@creative.net.au> | |
3 | ||
4 | $Id: file-management.txt 6 2005-09-10 01:02:21Z nenolod $ | |
5 | ||
6 | ||
7 | File operations | |
8 | --------------- | |
9 | ||
10 | The file operations are also wrapped through file_open() and file_close() | |
11 | which handle calling fd_open() / fd_close() and tracking the filedescriptors | |
12 | correctly. fbopen() / fbclose() use file_open() / file_close() too. | |
13 | ||
14 | fileio.c defines the functions: | |
15 | ||
16 | int | |
17 | file_open(const char *filename, int mode, int fmode) | |
18 | ||
19 | A wrapper around open(filename, flags, mode). Read the open manpage for | |
20 | information. file_open() enforces filedescriptor limits and tags the FD | |
21 | through fd_open(). | |
22 | ||
23 | void | |
24 | file_close(int fd) | |
25 | ||
26 | A wrapper around close() for files. close() handles fd_close()ing the fd. | |
27 | ||
28 | ||
29 | FBFILE * | |
30 | fbopen(const char *filename, const char *mode) | |
31 | ||
32 | void | |
33 | fbclose(FBFILE *fb) | |
34 | ||
35 | These are the 'buffered disk IO' routines. You can read the code yourself. | |
36 | Note that these routines use file_open() and file_close(). | |
37 |