Implement the replace-file functionality

Rules require a doc comment for url.