(self, destdir, sourcedir=None)
return status
Copy directories
Copy directories
Copy directories
def copydir(self, destdir, sourcedir=None):
        """Copy directories"""
        if sourcedir is None:
            sourcedir = self.filename
        verbose = ''
        if Msg.level >= Msg.VER:
            verbose = 'v'
        cmd_tarc = ["tar", "-C", sourcedir, "-c" + verbose,
                    "--one-file-system", "-S", "--xattrs", "-f", "-", "."]
        cmd_tarx = ["tar", "-C", destdir, "-x" + verbose, "-f", "-"]
        status = Uprocess().pipe(cmd_tarc, cmd_tarx)
        if not status:
            Msg().err("Error: copying:", sourcedir, " to ", destdir, l=Msg.VER)
        return status
def copydir ( self , destdir , sourcedir = None ) : if sourcedir is None : sourcedir = self . filename verbose = '' if Msg . level >= Msg . VER : verbose = 'v' cmd_tarc = [ "tar" , "-C" , sourcedir , "-c" + verbose , "--one-file-system" , "-S" , "--xattrs" , "-f" , "-" , "." ] cmd_tarx = [ "tar" , "-C" , destdir , "-x" + verbose , "-f" , "-" ] status = Uprocess ( ) . pipe ( cmd_tarc , cmd_tarx ) if not status : Msg ( ) . err ( "Error: copying:" , sourcedir , " to " , destdir , l = Msg . VER ) return status