30 #include "../my_config.h"
54 class fichier :
public generic_file,
public thread_cancellation
58 fichier(user_interaction & dialog, S_I fd);
59 fichier(user_interaction & dialog,
const char *name,
gf_mode m, U_I mode,
bool furtive_mode);
60 fichier(user_interaction & dialog,
const std::string & chemin,
gf_mode m, U_I mode,
bool furtive_mode);
61 fichier(
const std::string & chemin,
bool furtive_mode =
false);
62 fichier(
const fichier & ref) :
generic_file(ref) { copy_from(ref); };
65 const fichier & operator = (
const fichier & ref) { detruit(); copy_from(ref);
return *
this; };
68 ~fichier() { detruit(); };
72 virtual void change_ownership(
const std::string & user,
const std::string & group);
75 virtual void change_permission(U_I perm);
78 infinint get_size()
const;
81 bool skip(
const infinint & pos);
83 bool skip_relative(S_I x);
84 infinint get_position();
86 #ifdef LIBDAR_SPECIAL_ALLOC
87 USE_SPECIAL_ALLOC(fichier);
90 U_I inherited_read(
char *a, U_I size);
91 void inherited_write(
const char *a, U_I size);
92 void inherited_sync_write() {};
93 void inherited_terminate() {};
97 user_interaction *x_dialog;
99 void open(
const char *name,
gf_mode m, U_I perm,
bool furtive_mode);
100 void copy_from(
const fichier & ref);
101 void detruit() { close(filedesc); filedesc = -1;
if(x_dialog != NULL) {
delete x_dialog; x_dialog = NULL; } };
102 void init_dialog(user_interaction &dialog);