Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 8 of 8 for isSameTree (0.17 sec)

  1. src/test/java/jcifs/SmbTreeHandleTest.java

            assertFalse(smbTreeHandle.isSameTree(anotherHandle), "isSameTree should return false for a different handle");
        }
    
        /**
         * Test for isSMB2() method.
         * Verifies that the method returns the correct SMB protocol version status.
         */
        @Test
        void testIsSMB2() {
            when(smbTreeHandle.isSMB2()).thenReturn(true);
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 7.1K bytes
    - Viewed (0)
  2. src/test/java/jcifs/smb/SmbTreeHandleImplTest.java

            verify(treeConnection).getConnectedShare();
        }
    
        @Test
        @DisplayName("isSameTree: different types and delegated compare")
        void isSameTreeCoversBranches() {
            // Covers non-impl (false) and impl path delegating to connection comparison
            // Not an impl -> false
            assertFalse(handle.isSameTree(mock(SmbTreeHandle.class)));
    
            // Impl case delegates to treeConnection.isSame
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 14.4K bytes
    - Viewed (0)
  3. src/main/java/jcifs/smb/SmbTreeHandleImpl.java

            return this.treeConnection.getConnectedShare();
        }
    
        /**
         *
         * {@inheritDoc}
         *
         * @see jcifs.SmbTreeHandle#isSameTree(jcifs.SmbTreeHandle)
         */
        @Override
        public boolean isSameTree(final SmbTreeHandle th) {
            if (!(th instanceof SmbTreeHandleImpl)) {
                return false;
            }
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Sun Aug 31 08:00:57 UTC 2025
    - 11.1K bytes
    - Viewed (0)
  4. src/main/java/jcifs/SmbTreeHandle.java

        /**
         * Checks if this tree handle refers to the same tree as another
         * @param th the tree handle to compare with
         * @return whether the handles refer to the same tree
         */
        boolean isSameTree(SmbTreeHandle th);
    
        /**
         * Checks if this tree handle uses SMB2 or later protocol
         * @return whether this tree handle uses SMB2+
         */
        boolean isSMB2();
    
        /**
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Sat Aug 16 01:32:48 UTC 2025
    - 2.6K bytes
    - Viewed (0)
  5. src/test/java/jcifs/smb/SmbCopyUtilTest.java

            SmbTreeHandleImpl dh = mock(SmbTreeHandleImpl.class);
            when(sh.isSMB2()).thenReturn(true);
            when(dh.isSMB2()).thenReturn(true);
            when(sh.isSameTree(dh)).thenReturn(true);
    
            // Source open returns a handle that reports size 0
            SmbFileHandleImpl sfd = mock(SmbFileHandleImpl.class);
            when(sfd.getInitialSize()).thenReturn(0L);
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 12.1K bytes
    - Viewed (0)
  6. src/main/java/jcifs/smb/SmbCopyUtil.java

                final SmbTreeHandleImpl sh, final SmbTreeHandleImpl dh) throws SmbException {
    
            if (sh.isSMB2() && dh.isSMB2() && sh.isSameTree(dh)) {
                try {
                    serverSideCopy(src, dest, sh, dh, false);
                    return;
                } catch (final SmbUnsupportedOperationException e) {
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Sat Aug 16 01:32:48 UTC 2025
    - 16.6K bytes
    - Viewed (0)
  7. src/test/java/jcifs/smb/SmbFileTest.java

                doReturn(true).when(smbFile).exists();
                doReturn(false).when(dest).exists();
                when(mockTreeHandle.isSMB2()).thenReturn(false);
                when(mockTreeHandle.isSameTree(mockTreeHandle)).thenReturn(true);
                when(mockTreeHandle.send(any(SmbComRename.class), any(SmbComBlankResponse.class))).thenReturn(mock(SmbComBlankResponse.class));
    
                // Act
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 20.8K bytes
    - Viewed (0)
  8. src/main/java/jcifs/smb/SmbFile.java

                if (this.fileLocator.isRootOrShare() || dest.fileLocator.isRootOrShare()) {
                    throw new SmbException("Invalid operation for workgroups, servers, or shares");
                }
    
                if (!sh.isSameTree(th)) {
                    // trigger requests to resolve the actual target
                    exists();
                    dest.exists();
    
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Sat Aug 30 05:58:03 UTC 2025
    - 103.2K bytes
    - Viewed (0)
Back to top