33 #include "../my_config.h"
57 class fichier :
public generic_file,
public thread_cancellation
61 fichier(user_interaction & dialog, S_I fd);
62 fichier(user_interaction & dialog,
const char *name,
gf_mode m, U_I mode,
bool furtive_mode);
63 fichier(user_interaction & dialog,
const std::string & chemin,
gf_mode m, U_I mode,
bool furtive_mode);
64 fichier(
const std::string & chemin,
bool furtive_mode =
false);
65 fichier(
const fichier & ref) :
generic_file(ref) { copy_from(ref); };
68 const fichier & operator = (
const fichier & ref) { detruit(); copy_from(ref);
return *
this; };
71 ~fichier() { detruit(); };
75 virtual void change_ownership(
const std::string & user,
const std::string & group);
78 virtual void change_permission(U_I perm);
81 infinint get_size()
const;
84 bool skip(
const infinint & pos);
86 bool skip_relative(S_I x);
87 infinint get_position();
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);