41 #include "top_exception.h"    46 #define FILE_FN_CK(prm)     DBG_CK(prm)    47 #define FILE_FN_CK_2(prm, comm)     DBG_CK_2(prm, comm)    49 #define BJ_FILE_MAX_PATH_DEPTH 40    50 #define BJ_PATH_MAX 500  // should be PATH_MAX as in limits.h    52 #define BJ_LOCK_NAME    "lock.skl"    53 #define BJ_SECS_DEAD_LOCK   10000    60     flx_cannot_fit_in_mem,
    64 class file_exception : 
public top_exception {
    67     file_exception(
long the_id = 0, ch_string ff = 
"unknow_file") : top_exception(the_id)
    74 read_file(ch_string f_nam, row<char>& f_data);
    77 write_file(ch_string& the_pth, row<char>& cnn, 
bool write_once);
    80 rename_file(ch_string& old_pth, ch_string& nw_pth);
    85 inc_fnum(ch_string f_nam);
    88 get_fstr(ch_string f_nam);
    91 set_fstr(ch_string f_nam, ch_string the_val_str);
    94 update_elapsed(ch_string f_nam);
    97 read_elapsed(ch_string f_nam, average& the_avg);
   100 get_nftw_flag_str(
long ff);
   103 get_errno_str(
long val_errno);
   106 delete_dir_entry(
const char *fpath, 
const struct stat *sb,
   107             int tflag, 
struct FTW *ftwbuf);
   110 delete_directory(ch_string& dir_nm);
   113 file_touch(ch_string the_pth);
   116 get_file_write_lock(ch_string lk_dir);
   119 drop_file_write_lock(
int fd_lock);
   122 file_exists(ch_string th_pth);
   125 file_newer_than(ch_string the_pth, time_t tm1);
   128 path_verify(ch_string the_pth);
   131 make_dir(ch_string the_pth, mode_t mod);
   134 path_get_running_path();
   137 path_to_absolute_path(ch_string pth);
   140 path_create(ch_string n_pth);
   143 path_begins_with(ch_string the_pth, ch_string the_beg);
   146 path_ends_with(ch_string& the_str, ch_string& the_suf);
   149 path_delete(ch_string full_pth, ch_string up_to);
   152 path_get_directory(ch_string the_pth, 
bool add_last_dir_sep);
   155 path_get_name(ch_string the_pth);
   158 path_create_link(ch_string old_pth, ch_string new_pth);
   161 get_relative_path(ch_string pth1, ch_string pth2);
   164 path_slice(ch_string nam, row_long_t& sections);
   166 #endif      // FILE_FUNCS_H