#NEWLINE# def move( self , path , dest ) : #NEWLINE# #INDENT# parts = dest . rstrip ( '/' ) . split ( '/' ) #NEWLINE# if ( len ( parts ) > 1 ) : #NEWLINE# #INDENT# dir_path = '/' . join ( parts [ 0 : ( - 1 ) ] ) #NEWLINE# if ( not self . exists ( dir_path ) ) : #NEWLINE# #INDENT# self . mkdir ( dir_path , parents = True ) #NEWLINE# #UNINDENT# #UNINDENT# self . client . rename ( path , dest )