withFile package:rawfilepath

Acquire a file handle and perform an I/O action. The file will be closed on exit or when this I/O action throws an exception.