public function overwrite($file, $content)
    {
        $written = file_put_contents($file, $content);

        // If $content is not empty
        // but nothing was written to $file
        // throw an exception.
        if ($content and ! $written)
        {
            throw new RuntimeException(
                "Unable to write to {$file}."
            );
        }
    }