mime_file partial implementation.