native_client_sdk/src/tools/oshelpers.py
def MovePath(options, src, dst):
  """MovePath from src to dst.

  Moves the src to the dst much like the Unix style mv command, except it
  only handles one source at a time.  Because of possible temporary failures
  do to locks (such as anti-virus software on Windows), the function will retry
  up to five times.
  """
  # if the destination is not an existing directory, then overwrite it
  if os.path.isdir(dst):
    dst = os.path.join(dst, os.path.basename(src))

  # If the destination exists, the remove it
  if os.path.exists(dst):
    if options.force:
      Remove(['-vfr', dst])
      if os.path.exists(dst):
        raise OSError('mv: FAILED TO REMOVE ' + dst)
    else:
      raise OSError('mv: already exists ' + dst)
  for _ in range(5):
    try:
      os.rename(src, dst)
      break
    except OSError as error:
      print('Failed on %s with %s, retrying' % (src, error))
      time.sleep(5)
  else:
    print('Gave up.')
    raise OSError('mv: ' + error)
MovePath from src to dst.

  Moves the src to the dst much like the Unix style mv command, except it
  only handles one source at a time.  Because of possible temporary failures
  do to locks (such as anti-virus software on Windows), the function will retry
  up to five times.
  
MovePath from src to dst.
Moves the src to the dst much like the Unix style mv command, except it
only handles one source at a time.  Because of possible temporary failures
do to locks (such as anti-virus software on Windows), the function will retry
up to five times.
MovePath from src to dst . Moves the src to the dst much like the Unix style mv command except it only handles one source at a time . Because of possible temporary failures do to locks ( such as anti - virus software on Windows ) the function will retry up to five times .
def MovePath(options, src, dst):
  if os.path.isdir(dst):
    dst = os.path.join(dst, os.path.basename(src))
  if os.path.exists(dst):
    if options.force:
      Remove(['-vfr', dst])
      if os.path.exists(dst):
        raise OSError('mv: FAILED TO REMOVE ' + dst)
    else:
      raise OSError('mv: already exists ' + dst)
  for _ in range(5):
    try:
      os.rename(src, dst)
      break
    except OSError as error:
      print('Failed on %s with %s, retrying' % (src, error))
      time.sleep(5)
  else:
    print('Gave up.')
    raise OSError('mv: ' + error)
def MovePath ( options , src , dst ) : if os . path . isdir ( dst ) : dst = os . path . join ( dst , os . path . basename ( src ) ) if os . path . exists ( dst ) : if options . force : Remove ( [ '-vfr' , dst ] ) if os . path . exists ( dst ) : raise OSError ( 'mv: FAILED TO REMOVE ' + dst ) else : raise OSError ( 'mv: already exists ' + dst ) for _ in range ( 5 ) : try : os . rename ( src , dst ) break except OSError as error : print ( 'Failed on %s with %s, retrying' % ( src , error ) ) time . sleep ( 5 ) else : print ( 'Gave up.' ) raise OSError ( 'mv: ' + error )
MovePath from src to dst.
MovePath from src to dst .
"""MovePath from src to dst.

  Moves the src to the dst much like the Unix style mv command, except it
  only handles one source at a time.  Because of possible temporary failures
  do to locks (such as anti-virus software on Windows), the function will retry
  up to five times.
  """ # if the destination is not an existing directory, then overwrite it # If the destination exists, the remove it
options
src
dst