KFileItem: use permissions to determine isWritable and isReadable
This saves a lot of stat calls for local files.
It would allow remote protocols to have their exposed permissions taken into account instead of relying solely on KProtocolManager::supportsWriting(d->m_url)
when they have uid/gid matching the client system (i.e NFS).
The drawback is that now KFileItem can have permissions detached compared to the data on disk for local files. But permission change is something we track with inotify.
Candidat to be backported to kf5.
Edited by Méven Car