aboutsummaryrefslogtreecommitdiff
path: root/src/include/common/file_utils.h
blob: b1f1a3a1c15a41e180de4e76dcce9b2f6a053a8a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
/*-------------------------------------------------------------------------
 *
 * File-processing utility routines for frontend code
 *
 * Assorted utility functions to work on files.
 *
 *
 * Portions Copyright (c) 1996-2019, PostgreSQL Global Development Group
 * Portions Copyright (c) 1994, Regents of the University of California
 *
 * src/include/common/file_utils.h
 *
 *-------------------------------------------------------------------------
 */
#ifndef FILE_UTILS_H
#define FILE_UTILS_H

extern int fsync_fname(const char *fname, bool isdir,
			const char *progname);
extern void fsync_pgdata(const char *pg_data, const char *progname,
			 int serverVersion);
extern void fsync_dir_recurse(const char *dir, const char *progname);
extern int durable_rename(const char *oldfile, const char *newfile,
			   const char *progname);
extern int	fsync_parent_path(const char *fname, const char *progname);

#endif							/* FILE_UTILS_H */