3 * \brief Header: File and directory operation routines
9 #include <sys/types.h> /* off_t */
12 #include "dialog.h" /* Dlg_head */
13 #include "widget.h" /* WLabel */
14 #include "fileopctx.h"
18 FileProgressStatus
copy_file_file (FileOpContext
*ctx
, const char *s
, const char *d
,
19 int ask_overwrite
, off_t
*progress_count
,
20 double *progress_bytes
, int is_toplevel_file
);
21 FileProgressStatus
move_dir_dir (FileOpContext
*ctx
, const char *s
, const char *d
,
22 off_t
*progress_count
, double *progress_bytes
);
23 FileProgressStatus
copy_dir_dir (FileOpContext
*ctx
, const char *s
, const char *d
, int toplevel
,
24 int move_over
, int delete, struct link
*parent_dirs
,
25 off_t
*progress_count
, double *progress_bytes
);
26 FileProgressStatus
erase_dir (FileOpContext
*ctx
, const char *s
, off_t
*progress_count
,
27 double *progress_bytes
);
29 int panel_operate (void *source_panel
, FileOperation op
, int force_single
);
31 extern int file_op_compute_totals
;
33 /* Error reporting routines */
35 /* Report error with one file */
36 FileProgressStatus
file_error (const char *format
, const char *file
);
38 /* Compute directory size */
39 /* callback to update status dialog */
40 typedef FileProgressStatus (*compute_dir_size_callback
)(const void *ui
, const char *dirname
);
42 /* return value is FILE_CONT or FILE_ABORT */
43 FileProgressStatus
compute_dir_size (const char *dirname
, const void *ui
,
44 compute_dir_size_callback cback
,
45 off_t
*ret_marked
, double *ret_total
);
47 /* status dialog of directory size computing */
53 ComputeDirSizeUI
*compute_dir_size_create_ui (void);
54 void compute_dir_size_destroy_ui (ComputeDirSizeUI
*ui
);
55 FileProgressStatus
compute_dir_size_update_ui (const void *ui
, const char *dirname
);
57 #endif /* MC_FILE_H */