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