Create a new Resource from an AutoClosable object
Create a resource for a temporary file, which will be deleted after closing the resource