parameters: (self, src, dst)
docstring: Copy data and all stat info ("cp -p src dst").
  
      Args:
        src: (str) source file
        dst: (str) destination, may be a directory
docstring_summary: Copy data and all stat info ("cp -p src dst").
docstring_tokens: Copy data and all stat info ( cp - p src dst ) .
function: def copy2(self, src, dst):
      """Copy data and all stat info ("cp -p src dst").
  
      Args:
        src: (str) source file
        dst: (str) destination, may be a directory
      """
      if self.filesystem.Exists(dst):
        if stat.S_ISDIR(self.filesystem.GetObject(dst).st_mode):
          dst = self.filesystem.JoinPaths(dst, os.path.basename(src))
      self.copyfile(src, dst)
      self.copystat(src, dst)
function_tokens: def copy2 ( self , src , dst ) : if self . filesystem . Exists ( dst ) : if stat . S_ISDIR ( self . filesystem . GetObject ( dst ) . st_mode ) : dst = self . filesystem . JoinPaths ( dst , os . path . basename ( src ) ) self . copyfile ( src , dst ) self . copystat ( src , dst )