This is potentially confusing, since it doesn't always accept a path. Rename to path_or_fd.