Skip to content

File es_posix.c

FileList > cubrid > src > storage > es_posix.c

Go to the source code of this file

  • #include "config.h"
  • #include <stdio.h>
  • #include <errno.h>
  • #include <fcntl.h>
  • #include <sys/types.h>
  • #include <sys/stat.h>
  • #include <assert.h>
  • #include <unistd.h>
  • #include <sys/vfs.h>
  • #include <string.h>
  • #include "porting.h"
  • #include "thread_compat.hpp"
  • #include "error_manager.h"
  • #include "system_parameter.h"
  • #include "error_code.h"
  • #include "es_posix.h"
  • #include "thread_entry.hpp"
  • #include "thread_manager.hpp"
  • #include "memory_wrapper.hpp"

Public Attributes

Type Name
char es_base_dir = { 0 }

Public Functions

Type Name
off_t es_local_get_file_size (const char * path)
int es_local_read_file (const char * path, void * buf, size_t count, off_t offset)
int es_make_dirs (const char * dirname1, const char * dirname2)
void es_posix_final (void)
int es_posix_init (const char * base_path)
int xes_posix_copy_file (const char * src_path, char * metaname, char * new_path)
int xes_posix_copy_file_with_prefix (const char * src_path, char * metaname, const char * prefix, char * new_path)
int xes_posix_create_file (char * new_path)
int xes_posix_delete_file (const char * path)
off_t xes_posix_get_file_size (const char * path)
int xes_posix_move_file_with_prefix (const char * src_path, const char * metaname, const char * prefix, char * new_path)
ssize_t xes_posix_read_file (const char * path, void * buf, size_t count, off_t offset)
int xes_posix_rename_file (const char * src_path, const char * metaname, char * new_path)
ssize_t xes_posix_write_file (const char * path, const void * buf, size_t count, off_t offset)

Public Static Functions

Type Name
int es_abs_open (const char * abs_path, int flags)
int es_abs_open (const char * abs_path, int flags, mode_t mode)
void es_get_unique_name (char * dirname1, char * dirname2, const char * metaname, char * filename)
int es_make_abs_path (char * abs_path, const char * src_path)
int es_os_rename_file_abs (const char * src, const char * dst)
void es_rename_path (const char * src, char * tgt, char * metaname)

Macros

Type Name
define ES_POSIX_COPY_BUFSIZE (4096 \* 4) /\* 16K \*/

Public Attributes Documentation

variable es_base_dir

char es_base_dir[PATH_MAX];

Public Functions Documentation

function es_local_get_file_size

off_t es_local_get_file_size (
    const  char * path
) 

function es_local_read_file

int es_local_read_file (
    const  char * path,
    void * buf,
    size_t count,
    off_t offset
) 

function es_make_dirs

int es_make_dirs (
    const  char * dirname1,
    const  char * dirname2
) 

function es_posix_final

void es_posix_final (
    void
) 

function es_posix_init

int es_posix_init (
    const  char * base_path
) 

function xes_posix_copy_file

int xes_posix_copy_file (
    const  char * src_path,
    char * metaname,
    char * new_path
) 

function xes_posix_copy_file_with_prefix

int xes_posix_copy_file_with_prefix (
    const  char * src_path,
    char * metaname,
    const  char * prefix,
    char * new_path
) 

function xes_posix_create_file

int xes_posix_create_file (
    char * new_path
) 

function xes_posix_delete_file

int xes_posix_delete_file (
    const  char * path
) 

function xes_posix_get_file_size

off_t xes_posix_get_file_size (
    const  char * path
) 

function xes_posix_move_file_with_prefix

int xes_posix_move_file_with_prefix (
    const  char * src_path,
    const  char * metaname,
    const  char * prefix,
    char * new_path
) 

function xes_posix_read_file

ssize_t xes_posix_read_file (
    const  char * path,
    void * buf,
    size_t count,
    off_t offset
) 

function xes_posix_rename_file

int xes_posix_rename_file (
    const  char * src_path,
    const  char * metaname,
    char * new_path
) 

function xes_posix_write_file

ssize_t xes_posix_write_file (
    const  char * path,
    const  void * buf,
    size_t count,
    off_t offset
) 

Public Static Functions Documentation

function es_abs_open

static int es_abs_open (
    const  char * abs_path,
    int flags
) 

function es_abs_open

static int es_abs_open (
    const  char * abs_path,
    int flags,
    mode_t mode
) 

function es_get_unique_name

static void es_get_unique_name (
    char * dirname1,
    char * dirname2,
    const  char * metaname,
    char * filename
) 

function es_make_abs_path

static int es_make_abs_path (
    char * abs_path,
    const  char * src_path
) 

function es_os_rename_file_abs

static int es_os_rename_file_abs (
    const  char * src,
    const  char * dst
) 

function es_rename_path

static void es_rename_path (
    const  char * src,
    char * tgt,
    char * metaname
) 

Macro Definition Documentation

define ES_POSIX_COPY_BUFSIZE

#define ES_POSIX_COPY_BUFSIZE `(4096 * 4)   /* 16K */`


The documentation for this class was generated from the following file cubrid/src/storage/es_posix.c