Warning: read_fn is deprecated. Use GLib.File.read.
Opens a file for reading.
The result is a FileInputStream that can be used to read the contents of the file.
If cancellable
is not null, then the operation can be cancelled by triggering
the cancellable object from another thread. If the operation was cancelled, the error
g_io_error_cancelled will be returned.
If the file does not exist, the g_io_error_not_found error will be returned. If the file is a directory, the g_io_error_is_directory error will be returned. Other errors are possible too, and depend on what kind of filesystem the file is on.
this |
File to read |
cancellable |
FileInputStream or null on error. Free the returned object with unref. |