VirtualBox

Ignore:
Timestamp:
Feb 23, 2022 12:48:02 PM (3 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
150114
Message:

Validation Kit/TxS: Implemented (local) copy file support for TxS. Useful for copying stuff around on guests. bugref:10195

Location:
trunk/src/VBox/ValidationKit/testdriver
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/ValidationKit/testdriver/txsclient.py

    r93156 r93895  
    10871087    #def "LIST    "
    10881088
     1089    def taskCopyFile(self, sSrcFile, sDstFile, fMode, fFallbackOkay):
     1090        """ Copies a file within the remote from source to destination. """
     1091        # Note: If fMode is set to 0, it's up to the target OS' implementation with
     1092        #       what a file mode the destination file gets created (i.e. via umask).
     1093        rc = self.sendMsg('CPFILE', (fMode, sSrcFile, sDstFile,));
     1094        if rc is True:
     1095            rc = self.recvAckLogged('CPFILE');
     1096        return rc;
     1097
    10891098    def taskUploadFile(self, sLocalFile, sRemoteFile, fMode, fFallbackOkay):
    10901099        #
     
    17151724        return Session.calcFileXferTimeout(cbFile);
    17161725
     1726    def asyncCopyFile(self, sSrcFile, sDstFile,
     1727                      fMode = 0, fFallbackOkay = True, cMsTimeout = 30000, fIgnoreErrors = False):
     1728        """
     1729        Initiates a file copying task on the remote.
     1730
     1731        Returns True on success, False on failure (logged).
     1732
     1733        The task returns True on success, False on failure (logged).
     1734        """
     1735        return self.startTask(cMsTimeout, fIgnoreErrors, "cpfile",
     1736                              self.taskCopyFile, (sSrcFile, sDstFile, fMode, fFallbackOkay));
     1737
    17171738    def asyncUploadFile(self, sLocalFile, sRemoteFile,
    17181739                        fMode = 0, fFallbackOkay = True, cMsTimeout = 30000, fIgnoreErrors = False):
  • trunk/src/VBox/ValidationKit/testdriver/vbox.py

    r93115 r93895  
    36673667                              (sRemoteSymlink, self.adjustTimeoutMs(cMsTimeout), fIgnoreErrors));
    36683668
     3669    def txsCopyFile(self, oSession, oTxsSession, sSrcFile, sDstFile, fMode = 0, cMsTimeout = 30000, fIgnoreErrors = False):
     3670        return self.txsDoTask(oSession, oTxsSession, oTxsSession.asyncCopyFile, \
     3671                              (sSrcFile, sDstFile, fMode, self.adjustTimeoutMs(cMsTimeout), fIgnoreErrors));
     3672
    36693673    def txsUploadFile(self, oSession, oTxsSession, sLocalFile, sRemoteFile, cMsTimeout = 30000, fIgnoreErrors = False):
    36703674        return self.txsDoTask(oSession, oTxsSession, oTxsSession.asyncUploadFile, \
Note: See TracChangeset for help on using the changeset viewer.

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette