- Sort Score
- Num 10 results
- Language All
Results 1 - 10 of 40 for SmbFile (0.1 seconds)
-
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) -
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/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) -
src/main/java/jcifs/smb1/smb1/SmbFileOutputStream.java
this(file, append, append ? SmbFile.O_CREAT | SmbFile.O_WRONLY | SmbFile.O_APPEND : SmbFile.O_CREAT | SmbFile.O_WRONLY | SmbFile.O_TRUNC); } /** * Creates an {@link java.io.OutputStream} for writing bytes to a file * on an SMB server addressed by the <code>SmbFile</code> parameter. See * {@link jcifs.smb1.smb1.SmbFile} for a detailed description and examples of * the smb URL syntax.
Created: Sun Apr 05 00:10:12 GMT 2026 - Last Modified: Sat Aug 16 01:32:48 GMT 2025 - 11K bytes - Click Count (0) -
src/main/java/jcifs/internal/smb2/lease/DirectoryLeaseManager.java
} try { // Create SmbFile with cached attributes SmbFile file = new SmbFile(filePath, context); // Note: We would need to add a method to SmbFile to set cached attributes // For now, just return the file object return file; } catch (Exception e) { log.warn("Failed to create SmbFile for {}: {}", filePath, e.getMessage());Created: Sun Apr 05 00:10:12 GMT 2026 - Last Modified: Sat Aug 23 01:47:47 GMT 2025 - 12.3K bytes - Click Count (0) -
src/main/java/jcifs/smb/SmbEnumerationUtil.java
Created: Sun Apr 05 00:10:12 GMT 2026 - Last Modified: Thu Aug 14 07:14:38 GMT 2025 - 12.3K bytes - Click Count (0) -
src/test/java/jcifs/context/CIFSContextWrapperTest.java
// Test get(String url) method String url = "smb://server/share/file.txt"; SmbResource mockSmbResource = mock(SmbFile.class); // Mocking SmbFile constructor is tricky, so we'll just verify the call to the delegate // and ensure no exception is thrown for a valid URL. // The actual SmbFile creation is outside the scope of this wrapper's direct responsibility.
Created: Sun Apr 05 00:10:12 GMT 2026 - Last Modified: Thu Aug 14 05:31:44 GMT 2025 - 10.7K bytes - Click Count (0) -
src/test/java/jcifs/smb/SmbEnumerationUtilTest.java
SmbFile smbFile = mock(SmbFile.class); when(delegate.accept(smbFile)).thenReturn(true); // Act boolean result = (boolean) invokePrivate(wrapper, "accept", new Class<?>[] { SmbResource.class }, smbFile); // Assert assertTrue(result); verify(delegate, times(1)).accept(smbFile); } @TestCreated: Sun Apr 05 00:10:12 GMT 2026 - Last Modified: Thu Aug 14 05:31:44 GMT 2025 - 17.1K bytes - Click Count (0)