mirror of
https://github.com/postgres/postgres.git
synced 2025-04-24 10:47:04 +03:00
Make sure that function declarations use names that exactly match the corresponding names from function definitions in optimizer, parser, utility, libpq, and "commands" code, as well as in remaining library code. Do the same for all code related to frontend programs (with the exception of pg_dump/pg_dumpall related code). Like other recent commits that cleaned up function parameter names, this commit was written with help from clang-tidy. Later commits will handle ecpg and pg_dump/pg_dumpall. Author: Peter Geoghegan <pg@bowt.ie> Reviewed-By: David Rowley <dgrowleyml@gmail.com> Discussion: https://postgr.es/m/CAH2-WznJt9CMM9KJTMjJh_zbL5hD9oX44qdJ4aqZtjFi-zA3Tg@mail.gmail.com
30 lines
1.1 KiB
C
30 lines
1.1 KiB
C
/*-------------------------------------------------------------------------
|
|
*
|
|
* file_ops.h
|
|
* Helper functions for operating on files
|
|
*
|
|
* Copyright (c) 2013-2022, PostgreSQL Global Development Group
|
|
*
|
|
*-------------------------------------------------------------------------
|
|
*/
|
|
#ifndef FILE_OPS_H
|
|
#define FILE_OPS_H
|
|
|
|
#include "filemap.h"
|
|
|
|
extern void open_target_file(const char *path, bool trunc);
|
|
extern void write_target_range(char *buf, off_t begin, size_t size);
|
|
extern void close_target_file(void);
|
|
extern void remove_target_file(const char *path, bool missing_ok);
|
|
extern void truncate_target_file(const char *path, off_t newsize);
|
|
extern void create_target(file_entry_t *entry);
|
|
extern void remove_target(file_entry_t *entry);
|
|
extern void sync_target_dir(void);
|
|
|
|
extern char *slurpFile(const char *datadir, const char *path, size_t *filesize);
|
|
|
|
typedef void (*process_file_callback_t) (const char *path, file_type_t type, size_t size, const char *link_target);
|
|
extern void traverse_datadir(const char *datadir, process_file_callback_t callback);
|
|
|
|
#endif /* FILE_OPS_H */
|