ARB
Functions
arb_file.cxx File Reference
#include "arb_file.h"
#include "arb_string.h"
#include "arb_msg.h"
#include <unistd.h>
#include <utime.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <cstdio>
#include <cerrno>
Include dependency graph for arb_file.cxx:

Go to the source code of this file.

Functions

long GB_size_of_file (const char *path)
 
long GB_size_of_FILE (FILE *in)
 
unsigned long GB_time_of_file (const char *path)
 
GB_ERROR GB_set_time_of_file (const char *path, unsigned long new_time)
 
long GB_mode_of_file (const char *path)
 
long GB_mode_of_link (const char *path)
 
bool GB_is_regularfile (const char *path)
 
bool GB_is_link (const char *path)
 
bool GB_is_fifo (const char *path)
 
bool GB_is_fifo (FILE *fp)
 
bool GB_is_executablefile (const char *path)
 
bool GB_is_privatefile (const char *path, bool read_private)
 
bool mode_is_user_writeable (long mode)
 
bool GB_is_writeablefile (const char *filename)
 
static bool GB_is_readable (const char *file_or_dir)
 
bool GB_is_readablefile (const char *filename)
 
bool GB_is_directory (const char *path)
 
long GB_getuid_of_file (const char *path)
 
int GB_unlink (const char *path)
 
void GB_unlink_or_warn (const char *path, GB_ERROR *error)
 
GB_ERROR GB_symlink (const char *target, const char *link)
 
GB_ERROR GB_set_mode_of_file (const char *path, long mode)
 
charGB_follow_unix_link (const char *path)
 
GB_ERROR GB_move_file (const char *oldpath, const char *newpath)
 
GB_ERROR GB_copy_file (const char *srcpath, const char *dstpath)
 
GB_ERROR GB_safe_rename_file (const char *oldpath, const char *newpath)
 
GB_ERROR GB_safe_copy_file (const char *oldpath, const char *newpath)
 

Function Documentation

long GB_size_of_file ( const char path)
long GB_size_of_FILE ( FILE *  in)

Definition at line 34 of file arb_file.cxx.

References GB_export_error().

Referenced by GB_login(), GB_map_FILE(), and gb_recover_corrupt_file().

unsigned long GB_time_of_file ( const char path)
GB_ERROR GB_set_time_of_file ( const char path,
unsigned long  new_time 
)

Definition at line 50 of file arb_file.cxx.

References GB_IO_error(), and NULp.

Referenced by ArbDBWriter::finishSave().

long GB_mode_of_file ( const char path)
long GB_mode_of_link ( const char path)

Definition at line 68 of file arb_file.cxx.

Referenced by gb_read_bin(), and GB_MAIN_TYPE::save_quick_as().

bool GB_is_regularfile ( const char path)
bool GB_is_link ( const char path)

Definition at line 83 of file arb_file.cxx.

Referenced by AW_is_link(), File_selection::filename_changed(), and GB_is_writeablefile().

bool GB_is_fifo ( const char path)

Definition at line 89 of file arb_file.cxx.

Referenced by ARB_zfclose(), gb_recover_corrupt_file(), and ArbDBWriter::startSaveAs().

bool GB_is_fifo ( FILE *  fp)

Definition at line 95 of file arb_file.cxx.

bool GB_is_executablefile ( const char path)

Definition at line 101 of file arb_file.cxx.

Referenced by ARB_executable().

bool GB_is_privatefile ( const char path,
bool  read_private 
)
bool mode_is_user_writeable ( long  mode)
inline

Definition at line 146 of file arb_file.cxx.

Referenced by GB_is_writeablefile().

bool GB_is_writeablefile ( const char filename)
static bool GB_is_readable ( const char file_or_dir)
static

Definition at line 161 of file arb_file.cxx.

Referenced by GB_is_readablefile().

bool GB_is_readablefile ( const char filename)
bool GB_is_directory ( const char path)
long GB_getuid_of_file ( const char path)

Definition at line 182 of file arb_file.cxx.

Referenced by GB_MAIN_TYPE::save_quick_as().

int GB_unlink ( const char path)
void GB_unlink_or_warn ( const char path,
GB_ERROR error 
)
GB_ERROR GB_symlink ( const char target,
const char link 
)

Definition at line 221 of file arb_file.cxx.

References error(), GB_IO_error(), GBS_global_string_copy(), and NULp.

Referenced by GB_MAIN_TYPE::save_quick_as().

GB_ERROR GB_set_mode_of_file ( const char path,
long  mode 
)
char* GB_follow_unix_link ( const char path)
GB_ERROR GB_move_file ( const char oldpath,
const char newpath 
)
GB_ERROR GB_copy_file ( const char srcpath,
const char dstpath 
)

Definition at line 302 of file arb_file.cxx.

References arb_assert, error(), GB_IO_error(), and NULp.

Referenced by GB_safe_copy_file().

GB_ERROR GB_safe_rename_file ( const char oldpath,
const char newpath 
)

Definition at line 332 of file arb_file.cxx.

References error(), GB_is_regularfile(), GB_move_file(), and NULp.

Referenced by copyMoveRuleset_cb().

GB_ERROR GB_safe_copy_file ( const char oldpath,
const char newpath 
)

Definition at line 342 of file arb_file.cxx.

References error(), GB_copy_file(), GB_is_regularfile(), and NULp.

Referenced by copyMoveRuleset_cb().