- Sort Score
- Num 10 results
- Language All
Results 1 - 8 of 8 for isSameTree (0.16 seconds)
-
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);
Created: Sun Apr 05 00:10:12 GMT 2026 - Last Modified: Thu Aug 14 05:31:44 GMT 2025 - 7.1K bytes - Click Count (0) -
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; }
Created: Sun Apr 05 00:10:12 GMT 2026 - Last Modified: Sun Aug 31 08:00:57 GMT 2025 - 11.1K bytes - Click Count (0) -
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(); /**Created: Sun Apr 05 00:10:12 GMT 2026 - Last Modified: Sat Aug 16 01:32:48 GMT 2025 - 2.6K bytes - Click Count (0) -
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
Created: Sun Apr 05 00:10:12 GMT 2026 - Last Modified: Thu Aug 14 05:31:44 GMT 2025 - 14.4K bytes - Click Count (0) -
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);
Created: Sun Apr 05 00:10:12 GMT 2026 - Last Modified: Thu Aug 14 05:31:44 GMT 2025 - 12.1K bytes - Click Count (0) -
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) {Created: Sun Apr 05 00:10:12 GMT 2026 - Last Modified: Sat Aug 16 01:32:48 GMT 2025 - 16.6K bytes - Click Count (0) -
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
Created: Sun Apr 05 00:10:12 GMT 2026 - Last Modified: Thu Aug 14 05:31:44 GMT 2025 - 20.8K bytes - Click Count (0) -
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();
Created: Sun Apr 05 00:10:12 GMT 2026 - Last Modified: Sat Aug 30 05:58:03 GMT 2025 - 103.2K bytes - Click Count (0)