Module jcifs

Interface SmbTreeHandle

All Superinterfaces:
AutoCloseable
All Known Subinterfaces:
SmbTreeHandleInternal

public interface SmbTreeHandle extends AutoCloseable
Handle to a connected SMB tree
Author:
mbechler
  • Method Details

    • getConfig

      Configuration getConfig()
      Gets the active configuration for this tree handle
      Returns:
      the active configuration
    • close

      void close() throws CIFSException
      Specified by:
      close in interface AutoCloseable
      Throws:
      CIFSException
      See Also:
    • isConnected

      boolean isConnected()
      Checks whether the tree is currently connected
      Returns:
      the tree is connected
    • getServerTimeZoneOffset

      long getServerTimeZoneOffset() throws CIFSException
      Gets the server timezone offset in milliseconds
      Returns:
      server timezone offset
      Throws:
      CIFSException - if an error occurs retrieving the timezone offset
    • getOEMDomainName

      String getOEMDomainName() throws CIFSException
      Gets the OEM domain name reported by the server
      Returns:
      server reported domain name
      Throws:
      CIFSException - if an error occurs retrieving the domain name
    • getConnectedShare

      String getConnectedShare()
      Gets the name of the share this tree is connected to
      Returns:
      the share we are connected to
    • isSameTree

      boolean isSameTree(SmbTreeHandle th)
      Checks if this tree handle refers to the same tree as another
      Parameters:
      th - the tree handle to compare with
      Returns:
      whether the handles refer to the same tree
    • isSMB2

      boolean isSMB2()
      Checks if this tree handle uses SMB2 or later protocol
      Returns:
      whether this tree handle uses SMB2+
    • getRemoteHostName

      String getRemoteHostName()
      Gets the remote host name for this tree connection
      Returns:
      the remote host name
    • getTreeType

      int getTreeType()
      Gets the tree type (share type such as disk, printer, pipe, etc.)
      Returns:
      the tree type