Re: File copying

2011-02-07 Thread Nader Morshed
On Mon, 7 Feb 2011 07:58:57 + John Emmas john...@tiscali.co.uk wrote: On 6 Feb 2011, at 19:05, Nader Morshed wrote: Thanks Nader. Is this the document you mean:- http://library.gnome.org/devel//gio/2.26/GFileInfo.html Yep, or in particular:

Re: File copying

2011-02-06 Thread John Emmas
On 5 Feb 2011, at 19:18, Kevin DeKorte wrote: Something like this GFile *file; GFileOutputStream *output; GDataOutputStream *data; file = g_file_new_for_uri(uri); output = g_file_replace(file, NULL, FALSE, G_FILE_CREATE_NONE, NULL, NULL); data =

Re: File copying

2011-02-06 Thread Nader Morshed
You need to call g_file_set_attributes_from_info() to apply your changes to the file info (See: The Description section in the GFileInfo gtk-docs) I might also suggest filtering results on your query of g_file_query_info and just using a loop to copy over all the attributes listed by

Re: File copying

2011-02-06 Thread John Emmas
On 6 Feb 2011, at 19:05, Nader Morshed wrote: You need to call g_file_set_attributes_from_info() to apply your changes to the file info (See: The Description section in the GFileInfo gtk-docs) I might also suggest filtering results on your query of g_file_query_info Thanks Nader. Is

Re: File copying

2011-02-05 Thread John Emmas
On 4 Feb 2011, at 22:57, Nader Morshed wrote: you might want to take a look at GIO's GFileInfo API. It has a large array of attributes to get/set, depending on the GIOModule being used. Thanks for the tip. I've been experimenting with the GFileInfo API today but inadvertently, it's led

Re: File copying

2011-02-05 Thread David Nečas
On Sat, Feb 05, 2011 at 06:29:20PM +, John Emmas wrote: g_file_replace() returns a GFileOutputStream* which (supposedly) I can use for writing new contents to the file. However, I've been unable to find any examples of writing to a file using a GFileOutputStream*. In fact, I can't find

Re: File copying

2011-02-05 Thread Kevin DeKorte
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 02/05/2011 11:29 AM, John Emmas wrote: On 4 Feb 2011, at 22:57, Nader Morshed wrote: you might want to take a look at GIO's GFileInfo API. It has a large array of attributes to get/set, depending on the GIOModule being used. Thanks for

Re: File copying

2011-02-04 Thread Nader Morshed
Glib has a few various functions for that, like g_chmod, g_stat, etc, but you might want to take a look at GIO's GFileInfo API. It has a large array of attributes to get/set, depending on the GIOModule being used. On Fri, 4 Feb 2011 22:51:36 + John Emmas john...@tiscali.co.uk wrote: Does