Add getfile similar to inspect's API.