diff options
author | Gustavo Noronha Silva <gns@src.gnome.org> | 2009-03-26 23:29:32 +0800 |
---|---|---|
committer | Gustavo Noronha Silva <gns@src.gnome.org> | 2009-03-26 23:29:32 +0800 |
commit | a551a219577761befd9450f487394013bad857d2 (patch) | |
tree | 426544de183f7f23838b8a094c07ca57d25a24ff /lib/ephy-file-helpers.c | |
parent | bd770032b47bdabac773b1158dde0dd9f76d2b20 (diff) | |
download | gsoc2013-epiphany-a551a219577761befd9450f487394013bad857d2.tar gsoc2013-epiphany-a551a219577761befd9450f487394013bad857d2.tar.gz gsoc2013-epiphany-a551a219577761befd9450f487394013bad857d2.tar.bz2 gsoc2013-epiphany-a551a219577761befd9450f487394013bad857d2.tar.lz gsoc2013-epiphany-a551a219577761befd9450f487394013bad857d2.tar.xz gsoc2013-epiphany-a551a219577761befd9450f487394013bad857d2.tar.zst gsoc2013-epiphany-a551a219577761befd9450f487394013bad857d2.zip |
Remove downloading files when cancelling the download.
svn path=/trunk/; revision=8940
Diffstat (limited to 'lib/ephy-file-helpers.c')
-rw-r--r-- | lib/ephy-file-helpers.c | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/lib/ephy-file-helpers.c b/lib/ephy-file-helpers.c index cc588985b..7f38978dd 100644 --- a/lib/ephy-file-helpers.c +++ b/lib/ephy-file-helpers.c @@ -754,3 +754,31 @@ ephy_file_delete_directory (const char *path) } g_object_unref (file); } + +/** + * ephy_file_delete_uri + * @uri: URI of the file to be deleted + * + * Remove the given URI. + * + */ +void +ephy_file_delete_uri (const char *uri) +{ + GFile *file; + gboolean ret; + + file = g_file_new_for_uri (uri); + + ret = g_file_delete (file, NULL, NULL); + + if (ret == TRUE) + { + LOG ("Deleted file at URI '%s'", uri); + } + else + { + LOG ("Couldn't file at URI '%s'", uri); + } + g_object_unref (file); +} |