1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66
|
#ifndef FILEOPS_H
#define FILEOPS_H
#include <libgnomevfs/gnome-vfs-types.h>
#include <libgnomevfs/gnome-vfs-file-info.h>
#include <libgnomevfs/gnome-vfs-monitor.h>
#include <gtk/gtk.h>
typedef void (*ScreemFileOp)( GnomeVFSMonitorEventType type,
const gchar *uri, gpointer data );
gboolean copy_file( const gchar *source, const gchar *dest,
ScreemFileOp cb, gpointer data );
gboolean copy_dir( const char *source, const gchar *dest, gboolean move,
ScreemFileOp cb, gpointer data );
gboolean move_file( const gchar *source, const gchar *dest,
ScreemFileOp cb, gpointer data );
gboolean delete_file( const gchar *file, ScreemFileOp cb, gpointer data );
gboolean delete_dir( const gchar *path, ScreemFileOp cb, gpointer data );
gboolean mkdir_recursive( const gchar *path, GnomeVFSFilePermissions perms,
ScreemFileOp cb, gpointer data );
gchar *relative_path( const gchar *text, const gchar *root );
gchar *relative_to_full( const gchar *relPath, const gchar *base_uri );
gboolean overwrite( const gchar *filename );
gboolean uri_exists( const gchar *filename, GnomeVFSResult *result );
gboolean uri_accessible( const gchar *filename,
GnomeVFSFilePermissions perms );
gchar* paths_match( const gchar *base_uri,
const gchar *path1, const gchar *path2 );
GString *load_file( const gchar *path,
gboolean *compressed, gchar **charset, GError **error );
gboolean save_file( const gchar *path, const gchar *data,
GnomeVFSFilePermissions perms,
gboolean compress,
GError **error );
gboolean screem_uri_is_dir( const gchar *uri );
gchar *screem_create_tmp_file( const gchar *base, const gchar *ext, gboolean tmpdir );
gchar *screem_get_dot_dir( void );
GSList *screem_vfs_scandir( const gchar *dir,
gint (*filter)( const GnomeVFSFileInfo *info ),
GCompareFunc compare,
gboolean recurse );
void screem_init_vfs_callbacks( void );
gchar * screem_fileselect( const gchar *title, GtkWindow *parent,
GtkFileChooserAction action,
const gchar *dir,
const GSList *filters );
GSList * screem_fileselect_multi( const gchar *title, GtkWindow *parent,
GtkFileChooserAction action,
const gchar *dir,
const GSList *filters );
gint screem_compare_file_age( const gchar *a, const gchar *b );
#endif
|