I’m trying to migrate away from GnomeVFS to GIO in my application. One issue I’m trying to solve is to search in files for the occurrence of a string. In the GIO documentation it says that I could use
g_file_open_readwrite() for opening the files. But in its documentation it says:
Note that in many non-local file cases read and write streams are not supported, so make sure you really need to do read and write streaming, rather than just opening for reading or writing.
To me this statement is a bit unclear.
- How would a remote file be opened without using streams? Is there a separate function available in GIO? I know that
g_open()exists, but this seems to be only applicable for local files, right? For example, how can I open a file through a samba share (
smb://...) for searching in it, without using the GIO method mentioned in the beginning?
- When a non-streamable file should be opened via
g_file_open_readwrite(), would this error case be reported in the GError argument?