I need to identify if a file is or not executable. Of course, I’m not talking about checking the +x flag in the attributes, but about checking the content and detecting if it is an ELF binary, an script (because it starts with #!)… something that I can execute by calling spawn. Is there something in glib that does this?