parameters: (self, arg)
docstring: Usage: cd [path]
docstring_summary: Usage: cd [path]
docstring_tokens: Usage : cd [ path ]
function: def do_cd(self, arg):
          """Usage: cd [path]"""
          args = arg.split()
          if len(args) > 1:
              print(self.do_cd.__doc__)
              return
          if self.cwd == None:
              print('INFO: Not logged in')
              return
  
          if len(args) == 0:
              self.cwd = self._api.getRootNode()
              return
  
          node = self._api.getNodeByPath(args[0], self.cwd)
          if node == None:
              print('{}: No such file or directory'.format(args[0]))
              return
          if node.getType() == MegaNode.TYPE_FILE:
              print('{}: Not a directory'.format(args[0]))
              return
          self.cwd = node
function_tokens: def do_cd ( self , arg ) : args = arg . split ( ) if len ( args ) > 1 : print ( self . do_cd . __doc__ ) return if self . cwd == None : print ( 'INFO: Not logged in' ) return if len ( args ) == 0 : self . cwd = self . _api . getRootNode ( ) return node = self . _api . getNodeByPath ( args [ 0 ] , self . cwd ) if node == None : print ( '{}: No such file or directory' . format ( args [ 0 ] ) ) return if node . getType ( ) == MegaNode . TYPE_FILE : print ( '{}: Not a directory' . format ( args [ 0 ] ) ) return self . cwd = node