PostgreSQL Source Code  git master
file_utils.h
Go to the documentation of this file.
1 /*-------------------------------------------------------------------------
2  *
3  * File-processing utility routines for frontend code
4  *
5  * Assorted utility functions to work on files.
6  *
7  *
8  * Portions Copyright (c) 1996-2020, PostgreSQL Global Development Group
9  * Portions Copyright (c) 1994, Regents of the University of California
10  *
11  * src/include/common/file_utils.h
12  *
13  *-------------------------------------------------------------------------
14  */
15 #ifndef FILE_UTILS_H
16 #define FILE_UTILS_H
17 
18 extern int fsync_fname(const char *fname, bool isdir);
19 extern void fsync_pgdata(const char *pg_data, int serverVersion);
20 extern void fsync_dir_recurse(const char *dir);
21 extern int durable_rename(const char *oldfile, const char *newfile);
22 extern int fsync_parent_path(const char *fname);
23 
24 #endif /* FILE_UTILS_H */
int durable_rename(const char *oldfile, const char *newfile)
Definition: file_utils.c:340
void fsync_pgdata(const char *pg_data, int serverVersion)
Definition: file_utils.c:58
int fsync_fname(const char *fname, bool isdir)
Definition: fd.c:616
static char * pg_data
Definition: initdb.c:123
int fsync_parent_path(const char *fname)
Definition: file_utils.c:313
void fsync_dir_recurse(const char *dir)
Definition: file_utils.c:122