def clone(self, path = None, *, with_contents = True, **options):
file = File(path if path else self.path, cwd=options.get("<STR_LIT>", self.cwd))<EOL>file.base = options.get("<STR_LIT>", self.base)<EOL>if with_contents:<EOL><INDENT>file.contents = options.get("<STR_LIT>", self.contents)<EOL><DEDENT>return file<EOL>
Clone the file.