annotate src/ui_fileops.h @ 943:b483d8cdedb6

improved updating of view_dir_tree
author nadvornik
date Sun, 27 Jul 2008 08:57:12 +0000
parents e07895754e65
children 4fe8f9656107
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
9
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
1 /*
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
2 * (SLIK) SimpLIstic sKin functions
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
3 * (C) 2004 John Ellis
475
48c8e49b571c updated copyright in source files
nadvornik
parents: 446
diff changeset
4 * Copyright (C) 2008 The Geeqie Team
9
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
5 *
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
6 * Author: John Ellis
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
7 *
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
8 * This software is released under the GNU General Public License (GNU GPL).
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
9 * Please read the included file COPYING for more information.
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
10 * This software comes with no warranty of any kind, use at your own risk!
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
11 */
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
12
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
13
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
14 #ifndef UI_FILEOPS_H
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
15 #define UI_FILEOPS_H
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
16
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
17
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
18 #include <sys/stat.h>
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
19 #include <sys/time.h>
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
20 #include <sys/types.h>
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
21 #include <time.h>
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
22
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
23
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
24
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
25 void print_term(const gchar *text_utf8);
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
26
403
2649a28d31b6 Introduce printf_term() macro and use it.
zas_
parents: 319
diff changeset
27 #define printf_term(...) \
2649a28d31b6 Introduce printf_term() macro and use it.
zas_
parents: 319
diff changeset
28 do { \
2649a28d31b6 Introduce printf_term() macro and use it.
zas_
parents: 319
diff changeset
29 gchar *msg = g_strdup_printf(__VA_ARGS__); \
2649a28d31b6 Introduce printf_term() macro and use it.
zas_
parents: 319
diff changeset
30 print_term(msg); \
2649a28d31b6 Introduce printf_term() macro and use it.
zas_
parents: 319
diff changeset
31 g_free(msg); \
442
4b2d7f9af171 Big whitespaces cleanup:
zas_
parents: 403
diff changeset
32 } while (0)
403
2649a28d31b6 Introduce printf_term() macro and use it.
zas_
parents: 319
diff changeset
33
9
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
34 gchar *path_to_utf8(const gchar *path);
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
35 gchar *path_from_utf8(const gchar *path);
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
36
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
37 const gchar *homedir(void);
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
38 gint stat_utf8(const gchar *s, struct stat *st);
40
dcc04a6a58bf Sat Apr 16 12:29:42 2005 John Ellis <johne@verizon.net>
gqview
parents: 9
diff changeset
39 gint lstat_utf8(const gchar *s, struct stat *st);
9
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
40 gint isname(const gchar *s);
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
41 gint isfile(const gchar *s);
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
42 gint isdir(const gchar *s);
40
dcc04a6a58bf Sat Apr 16 12:29:42 2005 John Ellis <johne@verizon.net>
gqview
parents: 9
diff changeset
43 gint islink(const gchar *s);
9
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
44 gint64 filesize(const gchar *s);
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
45 time_t filetime(const gchar *s);
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
46 gint filetime_set(const gchar *s, time_t tval);
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
47 gint access_file(const gchar *s, int mode);
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
48 gint unlink_file(const gchar *s);
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
49 gint symlink_utf8(const gchar *source, const gchar *target);
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
50 gint mkdir_utf8(const gchar *s, int mode);
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
51 gint rmdir_utf8(const gchar *s);
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
52 gint copy_file_attributes(const gchar *s, const gchar *t, gint perms, gint mtime);
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
53 gint copy_file(const gchar *s, const gchar *t);
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
54 gint move_file(const gchar *s, const gchar *t);
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
55 gint rename_file(const gchar *s, const gchar *t);
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
56 gchar *get_current_dir(void);
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
57
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
58 /* return True on success, it is up to you to free
138
71e1ebee420e replaced gchar* path with FileData *fd
nadvornik
parents: 112
diff changeset
59 * the lists with string_list_free()
9
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
60 */
138
71e1ebee420e replaced gchar* path with FileData *fd
nadvornik
parents: 112
diff changeset
61 void string_list_free(GList *list);
71e1ebee420e replaced gchar* path with FileData *fd
nadvornik
parents: 112
diff changeset
62 GList *string_list_copy(GList *list);
9
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
63
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
64 gchar *unique_filename(const gchar *path, const gchar *ext, const gchar *divider, gint pad);
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
65 gchar *unique_filename_simple(const gchar *path);
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
66
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
67 const gchar *filename_from_path(const gchar *path);
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
68 gchar *remove_level_from_path(const gchar *path);
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
69
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
70 const gchar *extension_from_path(const gchar *path);
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
71 gchar *remove_extension_from_path(const gchar *path);
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
72
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
73 gint file_extension_match(const gchar *path, const gchar *ext);
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
74
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
75 /* warning note: this modifies path string! */
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
76 void parse_out_relatives(gchar *path);
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
77
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
78 gint file_in_path(const gchar *name);
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
79
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
80 #endif