Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
ルート ファイル システム ディレクトリでファイル モニターを実行しようとしています。をパスとして使用g_file_new_for_path()し/、でモニターを作成しg_file_monitor()ます。ただし、実行時にイベントは報告されません。パス//イベントを使用すると、スローされます。
g_file_new_for_path()
/
g_file_monitor()
//
GIO のバグですか、それとも使用する必要があります//か?
のドキュメントからg_file_new_for_path:
g_file_new_for_path
path : A string containing a relative or absolute path. The string must be encoded in the glib filename encoding
iirc をエンコードする GLib ファイルは次のようになります。 [protocol:]//path/to/file
[protocol:]//path/to/file
これもうまくいくはずだと思います: file:/これはへのエイリアスです//
file:/