def stash(self, path):
if os.path.isdir(path):<EOL><INDENT>new_path = self._get_directory_stash(path)<EOL><DEDENT>else:<EOL><INDENT>new_path = self._get_file_stash(path)<EOL><DEDENT>self._moves.append((path, new_path))<EOL>if os.path.isdir(path) and os.path.isdir(new_path):<EOL><INDENT>os.rmdir(new_path)<EOL><DEDENT>renames(path, new_path)<EOL>return new_path<EOL>
Stashes the directory or file and returns its new location.