Class SMB


  • public class SMB
    extends Object
    Class for SMB actions.
    Version:
    $Revision$
    Author:
    FracPete (fracpete at waikato dot ac dot nz)
    • Constructor Detail

      • SMB

        public SMB()
    • Method Detail

      • copyTo

        public static String copyTo​(LoggingObject owner,
                                    SMBAuthenticationProvider provider,
                                    File localFile,
                                    String remoteFile)
        Copies a local file to a remote server.
        Parameters:
        owner - the owner that initiates the transfer, can be null
        provider - the SMB authentication provider to use
        localFile - the local file
        remoteFile - the remote file
        Returns:
        null if successful, otherwise error message
      • copyFrom

        public static String copyFrom​(LoggingObject owner,
                                      SMBAuthenticationProvider provider,
                                      String remoteFile,
                                      File localFile)
        Copies a remote file onto the local machine.
        Parameters:
        owner - the owner that initiates the transfer
        provider - the SSH session provider to use
        remoteFile - the remote file to copy
        localFile - the local file
        Returns:
        null if successful, otherwise error message