News about version 4.6.2 and older were moved to doc/NEWS.OLD file.
[kaloumi3.git] / src / file.h
blob86b1c8f6656d641242b1248962166986f7d34b21
2 /** \file file.h
3 * \brief Header: File and directory operation routines
4 */
6 #ifndef MC_FILE_H
7 #define MC_FILE_H
9 #include <sys/types.h> /* off_t */
10 #include <sys/time.h>
12 #include "lib/global.h"
13 #include "dialog.h" /* Dlg_head */
14 #include "widget.h" /* WLabel */
15 #include "fileopctx.h"
17 struct link;
19 FileProgressStatus copy_file_file (FileOpTotalContext *tctx, FileOpContext *ctx,
20 const char *src_path, const char *dst_path);
21 FileProgressStatus move_dir_dir (FileOpTotalContext *tctx, FileOpContext *ctx,
22 const char *s, const char *d);
23 FileProgressStatus copy_dir_dir (FileOpTotalContext *tctx, FileOpContext *ctx,
24 const char *s, const char *d,
25 gboolean toplevel, gboolean move_over, gboolean do_delete,
26 struct link *parent_dirs);
27 FileProgressStatus erase_dir (FileOpTotalContext *tctx, FileOpContext *ctx,
28 const char *s);
30 gboolean panel_operate (void *source_panel, FileOperation op, gboolean force_single);
32 extern int file_op_compute_totals;
34 /* Error reporting routines */
36 /* Report error with one file */
37 FileProgressStatus file_error (const char *format, const char *file);
39 /* Compute directory size */
40 /* callback to update status dialog */
41 typedef FileProgressStatus (*compute_dir_size_callback)(const void *ui, const char *dirname);
43 /* return value is FILE_CONT or FILE_ABORT */
44 FileProgressStatus compute_dir_size (const char *dirname, const void *ui,
45 compute_dir_size_callback cback,
46 off_t *ret_marked, double *ret_total);
48 /* status dialog of directory size computing */
49 typedef struct {
50 Dlg_head *dlg;
51 WLabel *dirname;
52 } ComputeDirSizeUI;
54 ComputeDirSizeUI *compute_dir_size_create_ui (void);
55 void compute_dir_size_destroy_ui (ComputeDirSizeUI *ui);
56 FileProgressStatus compute_dir_size_update_ui (const void *ui, const char *dirname);
58 #endif /* MC_FILE_H */