| Top |
enum EphyMimePermission; constchar * ephy_file (const);char *filenamevoid ephy_file_add_recent_item (const,char *uriconst);char *mime_typegboolean ephy_file_browse_to (,GFile *file); EphyMimePermission ephy_file_check_mime (guint32 user_timeconst);char *mime_typevoid ephy_file_delete_directory (const);char *pathvoid ephy_file_delete_on_exit ();GFile *filevoid ephy_file_delete_uri (const);char *urichar * ephy_file_desktop_dir (void);char * ephy_file_downloads_dir (void);GSList * ephy_file_find (const,char *pathconst,char *fname);gint maxdepthchar * ephy_file_get_downloads_dir (void);gboolean ephy_file_helpers_init (const,char *profile_dir,gboolean private_profile,gboolean keep_temp_dir);GError **errorvoid ephy_file_helpers_shutdown (void);gboolean ephy_file_launch_application (,GAppInfo *app,GList *files,guint32 user_time);GtkWidget *widgetgboolean ephy_file_launch_desktop_file (const,char *filenameconst,char *parameter,guint32 user_time);GtkWidget *widgetgboolean ephy_file_launch_handler (const,char *mime_type,GFile *file);guint32 user_timegboolean ephy_file_switch_temp_file (,GFile *file_dest); constGFile *file_tempchar * ephy_file_tmp_dir (void);char * ephy_file_tmp_filename (const,char *baseconst);char *extension
typedef enum
{
EPHY_MIME_PERMISSION_SAFE = 1,
EPHY_MIME_PERMISSION_UNSAFE = 2,
EPHY_MIME_PERMISSION_UNKNOWN = 3
} EphyMimePermission;
constchar * ephy_file (const);char *filename
Looks for filename in Epiphany's directories and relevant paths.
|
the name of the Epiphany file requested |
Returns : |
the full path to the requested file |
void ephy_file_add_recent_item (const,char *uriconst);char *mime_type
Adds uri to the default mime_type as its type.
|
an URI |
|
the mime type corresponding to uri
|
gboolean ephy_file_browse_to (,GFile *file);guint32 user_time
Launches the default application for browsing directories, with file's
parent directory as its target. Passes user_time to
ephy_file_launch_handler() to prevent focus stealing.
|
a |
|
user_time to prevent focus stealing |
Returns : |
TRUE |
EphyMimePermission ephy_file_check_mime (const char *mime_type);
Checks mime_type against our safe/unsafe database of types, returns an
EphyMimePermission.
|
a mime type |
Returns : |
an EphyMimePermission |
void ephy_file_delete_directory (const);char *path
Remove path and its contents. Like calling rm -rf path.
|
the path to remove |
void ephy_file_delete_on_exit ();GFile *file
Schedules file to be deleted when Epiphany exits. This function currently
does nothing.
|
a |
void ephy_file_delete_uri (const);char *uri
Remove the given URI.
|
URI of the file to be deleted |
char * ephy_file_desktop_dir (void);
Gets the XDG desktop dir path or a default homedir/Desktop alternative.
Returns : |
a newly-allocated string containing the desktop dir path. |
char * ephy_file_downloads_dir (void);
Gets the basename for Epiphany's Downloads dir. This depends on the current
locale. For the full path to the downloads directory see
ephy_file_get_downloads_dir().
Returns : |
a newly-allocated string containing the downloads dir basename. |
GSList * ephy_file_find (const,char *pathconst,char *fname);gint maxdepth
Searchs for fname in path with a maximum depth of maxdepth.
|
path to search for fname
|
|
filename to search for |
|
maximum directory depth when searching path
|
Returns : |
a GSList of matches |
char * ephy_file_get_downloads_dir (void);
Gets the full path to the downloads dir. This uses ephy_file_downloads_dir()
internally and hence is locale dependant. Note that this can return NULL
Returns : |
a newly-allocated string containing the path to the downloads dir. |
gboolean ephy_file_helpers_init (const,char *profile_dir,gboolean private_profile,gboolean keep_temp_dir);GError **error
Initializes Epiphany file helper functions, sets profile_dir as Epiphany's
profile dir and whether the running session will be private.
|
directory to use as Epiphany's profile |
|
TRUE |
|
TRUE |
|
an optional |
Returns : |
FALSE |
void ephy_file_helpers_shutdown (void);
Cleans file helpers information, corresponds to ephy_file_helpers_init().
gboolean ephy_file_launch_application (,GAppInfo *app,GList *files,guint32 user_time);GtkWidget *widget
Launches app to open files. If widget is set the screen and display from
it will be used to launch the application, otherwise the defaults will be
used.
|
the application to launch |
|
files to pass to app
|
|
user time to prevent focus stealing |
|
a relevant widget from where to get the |
Returns : |
TRUEg_app_info_launch() |
gboolean ephy_file_launch_desktop_file (const,char *filenameconst,char *parameter,guint32 user_time);GtkWidget *widget
Calls ephy_file_launch_application() for the application described by the
.desktop file filename. Can pass parameter as optional file arguments.
|
the path to the .desktop file |
|
path to a parameter file to pass to the application |
|
user time to prevent focus stealing |
|
an optional widget for ephy_file_launch_application()
|
Returns : |
TRUE |
gboolean ephy_file_launch_handler (const,char *mime_type,GFile *file);guint32 user_time
Launches file with its default handler application, if mime_type is NULLfile will be queried for its type.
|
the mime type of file or NULL |
|
a |
|
user time to prevent focus stealing |
Returns : |
TRUE |
gboolean ephy_file_switch_temp_file (,GFile *file_dest);GFile *file_temp
Moves file_temp to file_dest atomically, doing a backup and restoring it if
something fails.
|
destination file |
|
file to move to file
|
Returns : |
TRUE |
constchar * ephy_file_tmp_dir (void);
Returns the name of the temp dir for the running Epiphany instance.
Returns : |
the name of the temp dir, this string belongs to Epiphany. |
char * ephy_file_tmp_filename (const,char *baseconst);char *extension
Creates a temp file with mkstemp()base as the name with an optional
extension.
|
the base name of the temp file to create |
|
an optional extension for base or NULL |
Returns : |
a newly-allocated string containing the name of the created temp
file or NULL |