How do I monitor the root directory using glib / gio?

I am trying to make a file monitor on the root filesystem. I use g_file_new_for_path()

with /

as path and create a monitor with g_file_monitor()

. But when events are executed, no events are reported. If I use path //

, events will be thrown.

Is it a bug with GIO or should I use it //

?

+3


source to share


1 answer


From the docs g_file_new_for_path

:

path : A string containing a relative or absolute path. 
       The string must be encoded in the glib filename encoding

      



The GLib iirc file encoding is as follows: [protocol:]//path/to/file

I think this should work too: file:/

which is an alias//

+2


source







All Articles