![]() |
![]() |
![]() |
GSF Reference Manual | ![]() |
---|---|---|---|---|
Reading and Writing from local files and directoriesReading and Writing from local files and directories |
GsfInputStdio; GsfInput* gsf_input_stdio_new (char const *filename, GError **err); GsfInput* gsf_input_stdio_new_FILE (char const *filename, FILE *file, gboolean keep_open); GsfOutputStdio; GsfOutput* gsf_output_stdio_new (char const *filename, GError **err); GsfOutput* gsf_output_stdio_new_full (char const *filename, GError **err, char const *first_property_name, ...); GsfOutput* gsf_output_stdio_new_valist (char const *filename, GError **err, char const *first_property_name, va_list var_args); GsfOutput* gsf_output_stdio_new_FILE (char const *filename, FILE *file, gboolean keep_open); GsfOutfileStdio; GsfOutfile* gsf_outfile_stdio_new (char const *root, GError **err); GsfOutfile* gsf_outfile_stdio_new_full (char const *root, GError **err, char const *first_property_name, ...); GsfOutfile* gsf_outfile_stdio_new_valist (char const *root, GError **err, char const *first_property_name, va_list var_args); GsfInfileStdio; GsfInfile* gsf_infile_stdio_new (char const *root, GError **err);
GObject +----GsfInput +----GsfInputStdio
GObject +----GsfOutput +----GsfOutputStdio
GObject +----GsfOutput +----GsfOutfile +----GsfOutfileStdio
GObject +----GsfInput +----GsfInfile +----GsfInfileStdio
GsfInput* gsf_input_stdio_new (char const *filename, GError **err);
|
in utf8. |
|
optionally NULL. |
Returns : |
a new file or NULL. |
GsfInput* gsf_input_stdio_new_FILE (char const *filename, FILE *file, gboolean keep_open);
Assumes ownership of file
. If keep_open
is true, ownership reverts
to caller when the GsfObject is closed.
|
The filename corresponding to file .
|
|
an existing stdio FILE * |
|
Should file be closed when the wrapper is closed
|
Returns : |
a new GsfInput wrapper for file . Note: the file must be
seekable, so this will not work for stdin when that is a tty or pipe.
|
GsfOutput* gsf_output_stdio_new (char const *filename, GError **err);
|
name of file to create or replace. |
|
optionally NULL .
|
Returns : |
a new file or NULL .
|
GsfOutput* gsf_output_stdio_new_full (char const *filename, GError **err, char const *first_property_name, ...);
|
name of file to create or replace. |
|
optionally NULL .
|
|
NULL terminated list of properties
|
|
|
Returns : |
a new file or NULL .
|
GsfOutput* gsf_output_stdio_new_valist (char const *filename, GError **err, char const *first_property_name, va_list var_args);
|
|
|
|
|
|
|
|
Returns : |
GsfOutput* gsf_output_stdio_new_FILE (char const *filename, FILE *file, gboolean keep_open);
Assumes ownership of file
. If keep_open
is true, ownership reverts
to caller when the GsfObject is closed.
|
The filename corresponding to file .
|
|
an existing stdio FILE * |
|
Should file be closed when the wrapper is closed
|
Returns : |
a new GsfOutput wrapper for file . Warning: the result will be
seekable only if file is seekable. If it is seekable, the resulting
GsfOutput object will seek relative to file 's beginning, not its
current location at the time the GsfOutput object is created.
|
GsfOutfile* gsf_outfile_stdio_new (char const *root, GError **err);
|
root directory in utf8. |
|
optionally NULL. |
Returns : |
a new outfile or NULL. |
GsfOutfile* gsf_outfile_stdio_new_full (char const *root, GError **err, char const *first_property_name, ...);
|
root directory in utf8. |
|
optionally NULL. |
|
name of first property to set |
|
value of first property, followed by more properties,
NULL -terminated
|
Returns : |
a new outfile or NULL. |
GsfOutfile* gsf_outfile_stdio_new_valist (char const *root, GError **err, char const *first_property_name, va_list var_args);
|
root directory in utf8. |
|
optionally NULL. |
|
name of first property to set |
|
a NULL -terminated va_list
|
Returns : |
a new outfile or NULL. |
GsfInfile* gsf_infile_stdio_new (char const *root, GError **err);
|
in locale dependent encoding |
|
optionally NULL .
|
Returns : |
a new file or NULL .
|