def _copy_content(self, origin, dstPath):
        """copy the content of origin into dstPath

           Due to concurrency problem, the content will be first
           copied to a temporary file alongside `dstPath` and
           then atomically moved to `dstPath`
        """

        if hasattr(origin, 'read'):
            copy_content(origin, dstPath, self.BLOCK_SIZE, self._conf['fmode'])
        elif os.path.isfile(origin):
            with open(origin, 'rb') as f:
                copy_content(f, dstPath, self.BLOCK_SIZE, self._conf['fmode'])
        else:
            raise ValueError("Could not copy content, `origin` should be a path or a readable object")
def _copy_content ( self , origin , dstPath ) : if hasattr ( origin , 'read' ) : copy_content ( origin , dstPath , self . BLOCK_SIZE , self . _conf [ 'fmode' ] ) elif os . path . isfile ( origin ) : with open ( origin , 'rb' ) as f : copy_content ( f , dstPath , self . BLOCK_SIZE , self . _conf [ 'fmode' ] ) else : raise ValueError ( "Could not copy content, `origin` should be a path or a readable object" )
copy the content of origin into dstPath

           Due to concurrency problem, the content will be first
           copied to a temporary file alongside `dstPath` and
           then atomically moved to `dstPath`