withFile package:mockery

Create a temporary file with the given contents and execute the given action. The file is removed after the action has completed.