annotate src/ui_fileops.h @ 90:dc3c77d027e6

Tue Oct 31 18:06:42 2006 John Ellis <johne@verizon.net> * info.c: Increase default info window size to 600x400. * po/be.po: Update Belarusian translation, submitted by Pavel Piatruk <berserker@neolocation.com>. * gqview.desktop: Add additional formats to MimeType list.
author gqview
date Tue, 31 Oct 2006 23:20:48 +0000
parents dcc04a6a58bf
children b15d4c18168f
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
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
4 *
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
5 * Author: John Ellis
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
6 *
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
7 * This software is released under the GNU General Public License (GNU GPL).
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
8 * Please read the included file COPYING for more information.
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
9 * 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
10 */
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 #ifndef UI_FILEOPS_H
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
14 #define UI_FILEOPS_H
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
15
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 #include <sys/stat.h>
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
18 #include <sys/time.h>
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
19 #include <sys/types.h>
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
20 #include <time.h>
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
21
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 #define CASE_SORT(a, b) ( (file_sort_case_sensitive) ? strcmp(a, b) : strcasecmp(a, b) )
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 extern gint file_sort_case_sensitive;
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
26
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
27 void print_term(const gchar *text_utf8);
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
28
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
29 gchar *path_to_utf8(const gchar *path);
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
30 gchar *path_from_utf8(const gchar *path);
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
31
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
32 const gchar *homedir(void);
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
33 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
34 gint lstat_utf8(const gchar *s, struct stat *st);
9
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
35 gint isname(const gchar *s);
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
36 gint isfile(const gchar *s);
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
37 gint isdir(const gchar *s);
40
dcc04a6a58bf Sat Apr 16 12:29:42 2005 John Ellis <johne@verizon.net>
gqview
parents: 9
diff changeset
38 gint islink(const gchar *s);
9
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
39 gint64 filesize(const gchar *s);
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
40 time_t filetime(const gchar *s);
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
41 gint filetime_set(const gchar *s, time_t tval);
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
42 gint access_file(const gchar *s, int mode);
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
43 gint unlink_file(const gchar *s);
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
44 gint symlink_utf8(const gchar *source, const gchar *target);
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
45 gint mkdir_utf8(const gchar *s, int mode);
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
46 gint rmdir_utf8(const gchar *s);
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
47 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
48 gint copy_file(const gchar *s, const gchar *t);
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
49 gint move_file(const gchar *s, const gchar *t);
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
50 gint rename_file(const gchar *s, const gchar *t);
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
51 gchar *get_current_dir(void);
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
52
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
53 /* return True on success, it is up to you to free
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
54 * the lists with path_list_free()
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
55 */
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
56 gint path_list(const gchar *path, GList **files, GList **dirs);
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
57 void path_list_free(GList *list);
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
58 GList *path_list_copy(GList *list);
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
59
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
60 long checksum_simple(const gchar *path);
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
61
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
62
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
63 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
64 gchar *unique_filename_simple(const gchar *path);
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
65
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
66 const gchar *filename_from_path(const gchar *path);
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
67 gchar *remove_level_from_path(const gchar *path);
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
68 gchar *concat_dir_and_file(const gchar *base, const gchar *name);
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
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
81
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
82
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
83