Mercurial > geeqie
annotate src/ui_fileops.h @ 135:15c1925b3bfb
improved external delete command
| author | nadvornik |
|---|---|
| date | Thu, 16 Aug 2007 20:57:09 +0000 |
| parents | b15d4c18168f |
| children | 71e1ebee420e |
| rev | line source |
|---|---|
| 9 | 1 /* |
| 2 * (SLIK) SimpLIstic sKin functions | |
| 3 * (C) 2004 John Ellis | |
| 4 * | |
| 5 * Author: John Ellis | |
| 6 * | |
| 7 * This software is released under the GNU General Public License (GNU GPL). | |
| 8 * Please read the included file COPYING for more information. | |
| 9 * This software comes with no warranty of any kind, use at your own risk! | |
| 10 */ | |
| 11 | |
| 12 | |
| 13 #ifndef UI_FILEOPS_H | |
| 14 #define UI_FILEOPS_H | |
| 15 | |
| 16 | |
| 17 #include <sys/stat.h> | |
| 18 #include <sys/time.h> | |
| 19 #include <sys/types.h> | |
| 20 #include <time.h> | |
| 21 | |
| 22 | |
| 23 #define CASE_SORT(a, b) ( (file_sort_case_sensitive) ? strcmp(a, b) : strcasecmp(a, b) ) | |
| 24 | |
| 25 extern gint file_sort_case_sensitive; | |
| 26 | |
| 27 void print_term(const gchar *text_utf8); | |
| 28 | |
| 29 gchar *path_to_utf8(const gchar *path); | |
| 30 gchar *path_from_utf8(const gchar *path); | |
| 31 | |
| 32 const gchar *homedir(void); | |
| 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 | 35 gint isname(const gchar *s); |
| 36 gint isfile(const gchar *s); | |
| 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 | 39 gint64 filesize(const gchar *s); |
| 40 time_t filetime(const gchar *s); | |
| 41 gint filetime_set(const gchar *s, time_t tval); | |
| 42 gint access_file(const gchar *s, int mode); | |
| 43 gint unlink_file(const gchar *s); | |
| 44 gint symlink_utf8(const gchar *source, const gchar *target); | |
| 45 gint mkdir_utf8(const gchar *s, int mode); | |
| 46 gint rmdir_utf8(const gchar *s); | |
| 47 gint copy_file_attributes(const gchar *s, const gchar *t, gint perms, gint mtime); | |
| 48 gint copy_file(const gchar *s, const gchar *t); | |
| 49 gint move_file(const gchar *s, const gchar *t); | |
| 50 gint rename_file(const gchar *s, const gchar *t); | |
| 51 gchar *get_current_dir(void); | |
| 52 | |
| 53 /* return True on success, it is up to you to free | |
| 54 * the lists with path_list_free() | |
| 55 */ | |
| 56 gint path_list(const gchar *path, GList **files, GList **dirs); | |
|
112
b15d4c18168f
Fri Nov 17 19:06:19 2006 John Ellis <johne@verizon.net>
gqview
parents:
40
diff
changeset
|
57 gint path_list_lstat(const gchar *path, GList **files, GList **dirs); |
| 9 | 58 void path_list_free(GList *list); |
| 59 GList *path_list_copy(GList *list); | |
| 60 | |
| 61 long checksum_simple(const gchar *path); | |
| 62 | |
| 63 | |
| 64 gchar *unique_filename(const gchar *path, const gchar *ext, const gchar *divider, gint pad); | |
| 65 gchar *unique_filename_simple(const gchar *path); | |
| 66 | |
| 67 const gchar *filename_from_path(const gchar *path); | |
| 68 gchar *remove_level_from_path(const gchar *path); | |
| 69 gchar *concat_dir_and_file(const gchar *base, const gchar *name); | |
| 70 | |
| 71 const gchar *extension_from_path(const gchar *path); | |
| 72 gchar *remove_extension_from_path(const gchar *path); | |
| 73 | |
| 74 gint file_extension_match(const gchar *path, const gchar *ext); | |
| 75 | |
| 76 /* warning note: this modifies path string! */ | |
| 77 void parse_out_relatives(gchar *path); | |
| 78 | |
| 79 gint file_in_path(const gchar *name); | |
| 80 | |
| 81 #endif | |
| 82 | |
| 83 | |
| 84 |
