Hi all,
First of all, I apologize in advance if this isn't the right place for this. If it is not, a pointer in the right direction would be greatly appreciated.
I'm working on a FUSE file system which makes network requests on write/read. This is all well and good, until the mounted directory is opened in a GTK application (nautilus, or any file selection dialog). If there are any files without an extension, 4096 bytes are read from this file in order to guess the MIME type. This can add significant overhead, as well as causing mystery network requests, which I'd like to avoid.
Is there any way to prevent this behavior at a per-file or per-directory level? According to the FreeDesktop standards[0], this could be done using the "user.mime_type" xattr, but this doesn't actually appear to be used by glib.