- Sort Score
- Num 10 results
- Language All
Results 1 - 10 of 92 for SmbFile (0.05 seconds)
-
src/main/java/jcifs/smb1/smb1/SmbFile.java
* Changes the name of the file this <code>SmbFile</code> represents to the name * designated by the <code>SmbFile</code> argument. * * <i>Remember: <code>SmbFile</code>s are immutible and therefore * the path associated with this <code>SmbFile</code> object will not * change). To access the renamed file it is necessary to construct a * new {@code SmbFile}</i>. *
Created: Sun Apr 05 00:10:12 GMT 2026 - Last Modified: Sat Aug 30 05:58:03 GMT 2025 - 112.2K bytes - Click Count (0) -
src/main/java/jcifs/smb/SmbFile.java
* resources are files and directories however an <code>SmbFile</code> * may also refer to servers and workgroups. If the resource is a file or * directory the methods of <code>SmbFile</code> follow the behavior of * the well known {@link java.io.File} class. One fundamental difference * is the usage of a URL scheme [1] to specify the target file or * directory. SmbFile URLs have the following syntax: * * <blockquote> *
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) -
src/main/java/jcifs/http/NetworkExplorer.java
final PrintWriter out = resp.getWriter(); SmbFile[] dirents; SmbFile f; int i, j, len, maxLen, dirCount, fileCount, sort; String str, name, path, fmt; LinkedList<SmbFile> sorted; ListIterator<SmbFile> iter;
Created: Sun Apr 05 00:10:12 GMT 2026 - Last Modified: Sat Aug 16 01:32:48 GMT 2025 - 23.4K bytes - Click Count (0) -
src/test/java/jcifs/http/NetworkExplorerTest.java
// Mock directory listing SmbFile file1 = mock(SmbFile.class); when(file1.getName()).thenReturn("document.pdf"); when(file1.isDirectory()).thenReturn(false); when(file1.length()).thenReturn(2048L); when(file1.lastModified()).thenReturn(System.currentTimeMillis()); SmbFile dir1 = mock(SmbFile.class); when(dir1.getName()).thenReturn("folder/");Created: Sun Apr 05 00:10:12 GMT 2026 - Last Modified: Thu Aug 21 04:51:33 GMT 2025 - 21.2K bytes - Click Count (0) -
src/test/java/jcifs/smb/SmbFileFilterTest.java
when(smbFile.length()).thenReturn(-1L); assertFalse(filter.accept(smbFile), "Negative size should be rejected"); verify(smbFile, times(1)).length(); // zero size -> reject reset(smbFile); when(smbFile.length()).thenReturn(0L); assertFalse(filter.accept(smbFile), "Zero size should be rejected"); verify(smbFile, times(1)).length();
Created: Sun Apr 05 00:10:12 GMT 2026 - Last Modified: Thu Aug 14 05:31:44 GMT 2025 - 5.4K bytes - Click Count (0) -
src/test/java/jcifs/smb1/smb1/SmbRandomAccessFileTest.java
smbTree.tree_num = 1; // Mock the SmbFile smbFile = mock(SmbFile.class); smbFile.tree = smbTree; smbFile.fid = 1; smbFile.tree_num = 1; when(smbFile.isFile()).thenReturn(true); when(smbFile.getUncPath()).thenReturn("\\\\server\\share\\file.txt"); when(smbFile.isOpen()).thenReturn(true); // Mock the open method to do nothingCreated: Sun Apr 05 00:10:12 GMT 2026 - Last Modified: Thu Aug 14 05:31:44 GMT 2025 - 9.3K bytes - Click Count (0) -
docs/smb3-features/04-directory-leasing-design.md
SmbFile dir = new SmbFile("smb://server/share/testdir/", context); SmbFile testFile = new SmbFile("smb://server/share/testdir/newfile.txt", context); // Get initial listing (establishes cache) SmbFile[] initialFiles = dir.listFiles(); // Create new file testFile.createNewFile(); // Wait for change notification Thread.sleep(2000);Created: Sun Apr 05 00:10:12 GMT 2026 - Last Modified: Sat Aug 16 02:53:50 GMT 2025 - 36.2K bytes - Click Count (0) -
src/test/java/jcifs/smb1/smb1/SmbFileFilterTest.java
* tests focus on the contract that implementations should honour and the * interaction with {@link SmbFile} instances. The tests make heavy use of * Mockito to guarantee that implementation classes do not inadvertently * bypass the filter logic. */ public class SmbFileFilterTest { /** * A minimal implementation that accepts every {@link SmbFile}. */ private final SmbFileFilter ALWAYSACTIVE = new SmbFileFilter() {Created: Sun Apr 05 00:10:12 GMT 2026 - Last Modified: Thu Aug 14 05:31:44 GMT 2025 - 3.2K bytes - Click Count (0) -
src/test/java/jcifs/smb/SmbFileTest.java
doReturn(mockFileHandle).when(smbFile).openUnshared(anyInt(), anyInt(), anyInt(), anyInt(), anyInt()); doNothing().when(mockFileHandle).close(0L); // Act smbFile.createNewFile(); // Assert verify(smbFile).openUnshared(SmbFile.O_RDWR | SmbFile.O_CREAT | SmbFile.O_EXCL, SmbFile.O_RDWR, SmbFile.FILE_NO_SHARE, SmbFile.ATTR_NORMAL, 0);
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/test/java/jcifs/smb/SmbCopyUtilTest.java
@DisplayName("copyFile wraps and throws when ignoreCopyToException=false") void copyFile_throwsWhenIgnoreFalse() throws Exception { // Arrange SmbFile src = mock(SmbFile.class, RETURNS_DEEP_STUBS); SmbFile dest = mock(SmbFile.class); CIFSContext ctx = ctxWithIgnore(false); when(src.getContext()).thenReturn(ctx); // Force failure before any stream constructionCreated: Sun Apr 05 00:10:12 GMT 2026 - Last Modified: Thu Aug 14 05:31:44 GMT 2025 - 12.1K bytes - Click Count (0)