1
2
3
4
5 #ifndef MC__FILE_H
6 #define MC__FILE_H
7
8 #include <inttypes.h>
9
10 #include "lib/global.h"
11 #include "lib/widget.h"
12
13 #include "filegui.h"
14
15
16
17 typedef struct dirsize_status_msg_t dirsize_status_msg_t;
18
19
20
21
22
23
24 struct dirsize_status_msg_t
25 {
26 status_msg_t status_msg;
27
28 gboolean allow_skip;
29 WLabel *dirname;
30 WLabel *count_size;
31 Widget *abort_button;
32 Widget *skip_button;
33 const vfs_path_t *dirname_vpath;
34 size_t dir_count;
35 uintmax_t total_size;
36 };
37
38
39
40
41
42 gboolean file_is_symlink_to_dir (const vfs_path_t * path, struct stat *st, gboolean * stale_link);
43
44 FileProgressStatus copy_file_file (file_op_context_t * ctx, const char *src_path,
45 const char *dst_path);
46 FileProgressStatus move_dir_dir (file_op_context_t * ctx, const char *s, const char *d);
47 FileProgressStatus copy_dir_dir (file_op_context_t * ctx, const char *s, const char *d,
48 gboolean toplevel, gboolean move_over, gboolean do_delete,
49 GSList * parent_dirs);
50 FileProgressStatus erase_dir (file_op_context_t * ctx, const vfs_path_t * vpath);
51
52 gboolean panel_operate (void *source_panel, FileOperation op, gboolean force_single);
53
54
55
56
57 FileProgressStatus file_error (file_op_context_t *ctx, gboolean allow_retry, const char *format,
58 const char *file);
59
60
61 FileProgressStatus compute_dir_size (const vfs_path_t * dirname_vpath, dirsize_status_msg_t * sm,
62 size_t *ret_dir_count, size_t *ret_marked_count,
63 uintmax_t * ret_total, gboolean follow_symlinks);
64
65 void dirsize_status_init_cb (status_msg_t * sm);
66 int dirsize_status_update_cb (status_msg_t * sm);
67 void dirsize_status_deinit_cb (status_msg_t * sm);
68
69
70 #endif