To be honest I copied this method verbatim from files_linux.go, and I actually think it should be moved to files.go (as it doesn't seem Linux-specific -- or at least, it compiles on OSX). If you want, I'll do that in a separate commit and update the PR.