def renames(from_path, to_path, user=None):
to_dir = path.dirname(to_path)<EOL>if to_dir:<EOL><INDENT>mkdir(to_dir, user=user)<EOL><DEDENT>rename(from_path, to_path, user=user)<EOL>
Rename ``from_path`` to ``to_path``, creating parents as needed.