I'm writing a text editor in gtk+ 2.0 & gtksourceview 2.0. Currently I'm using gtk_text_buffer_get_text
and g_file_set_contents
to save the textbuffer to a file. I see in the docs for g_file_set_contents
that it says:
Also since the file is recreated, existing permissions, access control lists, metadata etc. may be lost.
I looked around devhelp and Google and can't find an alternative way to save the textbuffer to a file while preserving file permissions. Any ideas on how to accomplish this? Thanks.