]>
git.ipfire.org Git - thirdparty/squid.git/blob - src/fs_io.h
2 * Copyright (C) 1996-2021 The Squid Software Foundation and contributors
4 * Squid software is distributed under GPLv2+ license and includes
5 * contributions from numerous individuals and organizations.
6 * Please see the COPYING and CONTRIBUTORS files for details.
9 /* DEBUG: section 06 Disk I/O Routines */
11 #ifndef SQUID_FS_IO_H_
12 #define SQUID_FS_IO_H_
14 #include "mem/forward.h"
15 #include "sbuf/forward.h"
16 #include "typedefs.h" //DRCB, DWCB
45 int file_open(const char *path
, int mode
);
46 void file_close(int fd
);
47 void file_write(int, off_t
, void const *, int len
, DWCB
*, void *, FREE
*);
48 void file_write_mbuf(int fd
, off_t
, MemBuf mb
, DWCB
* handler
, void *handler_data
);
49 void file_read(int, char *, int, off_t
, DRCB
*, void *);
50 void safeunlink(const char *path
, int quiet
);
53 * Wrapper for rename(2) which complains if something goes wrong;
54 * the caller is responsible for handing and explaining the
55 * consequences of errors.
57 * \retval true successful rename
58 * \retval false an error occurred
60 bool FileRename(const SBuf
&from
, const SBuf
&to
);
62 int fsBlockSize(const char *path
, int *blksize
);
63 int fsStats(const char *, int *, int *, int *, int *);
65 #endif /* SQUID_FS_IO_H_ */