PostgreSQL Source Code
git master
|
#include "postgres_fe.h"
#include <unistd.h>
#include "common/file_perm.h"
#include "common/logging.h"
#include "common/string.h"
#include "fe_utils/astreamer.h"
Go to the source code of this file.
Data Structures | |
struct | astreamer_plain_writer |
struct | astreamer_extractor |
Typedefs | |
typedef struct astreamer_plain_writer | astreamer_plain_writer |
typedef struct astreamer_extractor | astreamer_extractor |
Functions | |
static void | astreamer_plain_writer_content (astreamer *streamer, astreamer_member *member, const char *data, int len, astreamer_archive_context context) |
static void | astreamer_plain_writer_finalize (astreamer *streamer) |
static void | astreamer_plain_writer_free (astreamer *streamer) |
static void | astreamer_extractor_content (astreamer *streamer, astreamer_member *member, const char *data, int len, astreamer_archive_context context) |
static void | astreamer_extractor_finalize (astreamer *streamer) |
static void | astreamer_extractor_free (astreamer *streamer) |
static void | extract_directory (const char *filename, mode_t mode) |
static void | extract_link (const char *filename, const char *linktarget) |
static FILE * | create_file_for_extract (const char *filename, mode_t mode) |
astreamer * | astreamer_plain_writer_new (char *pathname, FILE *file) |
astreamer * | astreamer_extractor_new (const char *basepath, const char *(*link_map)(const char *), void(*report_output_file)(const char *)) |
static bool | should_allow_existing_directory (const char *pathname) |
Variables | |
static const astreamer_ops | astreamer_plain_writer_ops |
static const astreamer_ops | astreamer_extractor_ops |
typedef struct astreamer_extractor astreamer_extractor |
typedef struct astreamer_plain_writer astreamer_plain_writer |
|
static |
Definition at line 207 of file astreamer_file.c.
References Assert, ASTREAMER_ARCHIVE_TRAILER, ASTREAMER_MEMBER_CONTENTS, ASTREAMER_MEMBER_HEADER, ASTREAMER_MEMBER_TRAILER, ASTREAMER_UNKNOWN, astreamer_extractor::basepath, context, create_file_for_extract(), data, extract_directory(), extract_link(), astreamer_extractor::file, astreamer_extractor::filename, astreamer_member::is_directory, astreamer_member::is_link, len, astreamer_extractor::link_map, astreamer_member::linktarget, astreamer_member::mode, astreamer_member::pathname, pg_fatal, astreamer_extractor::report_output_file, and snprintf.
|
static |
|
static |
Definition at line 394 of file astreamer_file.c.
References astreamer_extractor::basepath, and pfree().
astreamer* astreamer_extractor_new | ( | const char * | basepath, |
const char *(*)(const char *) | link_map, | ||
void(*)(const char *) | report_output_file | ||
) |
Definition at line 187 of file astreamer_file.c.
References astreamer_extractor_ops, astreamer_extractor::base, astreamer_extractor::basepath, astreamer::bbs_ops, astreamer_extractor::link_map, palloc0(), pstrdup(), and astreamer_extractor::report_output_file.
Referenced by CreateBackupStreamer().
|
static |
Definition at line 108 of file astreamer_file.c.
References data, astreamer_plain_writer::file, len, astreamer_plain_writer::pathname, and pg_fatal.
|
static |
Definition at line 135 of file astreamer_file.c.
References astreamer_plain_writer::file, astreamer_plain_writer::pathname, pg_fatal, and astreamer_plain_writer::should_close_file.
|
static |
Definition at line 153 of file astreamer_file.c.
References Assert, astreamer_plain_writer::base, astreamer::bbs_next, astreamer_plain_writer::pathname, pfree(), and astreamer_plain_writer::should_close_file.
astreamer* astreamer_plain_writer_new | ( | char * | pathname, |
FILE * | file | ||
) |
Definition at line 82 of file astreamer_file.c.
References astreamer_plain_writer_ops, astreamer_plain_writer::base, astreamer::bbs_ops, astreamer_plain_writer::file, palloc0(), astreamer_plain_writer::pathname, pg_fatal, pstrdup(), and astreamer_plain_writer::should_close_file.
Referenced by CreateBackupStreamer().
|
static |
Definition at line 359 of file astreamer_file.c.
References filename, mode, and pg_fatal.
Referenced by astreamer_extractor_content().
|
static |
Definition at line 321 of file astreamer_file.c.
References filename, mkdir, mode, pg_dir_create_mode, pg_fatal, and should_allow_existing_directory().
Referenced by astreamer_extractor_content().
|
static |
Definition at line 346 of file astreamer_file.c.
References filename, pg_fatal, and symlink.
Referenced by astreamer_extractor_content().
|
static |
Definition at line 296 of file astreamer_file.c.
References filename, and last_dir_separator().
Referenced by extract_directory().
|
static |
Definition at line 66 of file astreamer_file.c.
Referenced by astreamer_extractor_new().
|
static |
Definition at line 50 of file astreamer_file.c.
Referenced by astreamer_plain_writer_new().