- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 49 for SmbFile (0.67 sec)
-
src/test/java/jcifs/smb1/smb1/SmbComOpenAndXTest.java
int flags = SmbFile.O_CREAT | SmbFile.O_EXCL; smbComOpenAndX = new SmbComOpenAndX(fileName, access, flags, andx); assertEquals(0x10, smbComOpenAndX.openFunction); // OPEN_FN_CREATE | OPEN_FN_FAIL_IF_EXISTS } /** * Test constructor with O_CREAT flag. */ @Test void testConstructor_CreateAndOpen() { int flags = SmbFile.O_CREAT;Registered: Sat Dec 20 13:44:44 UTC 2025 - Last Modified: Thu Aug 14 07:14:38 UTC 2025 - 5.6K bytes - Viewed (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 nothingRegistered: Sat Dec 20 13:44:44 UTC 2025 - Last Modified: Thu Aug 14 05:31:44 UTC 2025 - 9.3K bytes - Viewed (0) -
src/test/java/jcifs/smb/DosFileFilterTest.java
new DosFileFilter("*.*", SmbFile.ATTR_ARCHIVE); new DosFileFilter("?", SmbFile.ATTR_DIRECTORY); new DosFileFilter("file.txt", SmbFile.ATTR_READONLY | SmbFile.ATTR_HIDDEN); } /** * Parameterized test for the {@link DosFileFilter#accept(SmbFile)} method. * This test covers various combinations of file attributes and filter attributes
Registered: Sat Dec 20 13:44:44 UTC 2025 - Last Modified: Thu Aug 14 05:31:44 UTC 2025 - 6.2K bytes - Viewed (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() {Registered: Sat Dec 20 13:44:44 UTC 2025 - Last Modified: Thu Aug 14 05:31:44 UTC 2025 - 3.2K bytes - Viewed (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();
Registered: Sat Dec 20 13:44:44 UTC 2025 - Last Modified: Thu Aug 14 05:31:44 UTC 2025 - 5.4K bytes - Viewed (0) -
src/main/java/jcifs/smb1/smb1/SmbComOpenAndX.java
Registered: Sat Dec 20 13:44:44 UTC 2025 - Last Modified: Thu Aug 14 07:14:38 UTC 2025 - 5.6K bytes - Viewed (0) -
src/test/java/jcifs/smb1/smb1/SmbFileTest.java
String url = "smb1://user:pass@server/share/file.txt"; SmbFile smbFile = new SmbFile(url, mockAuth); assertNotNull(smbFile); assertEquals(mockAuth, smbFile.getPrincipal()); assertEquals("server", smbFile.getServer()); assertEquals("share", smbFile.getShare()); } @Test public void testConstructorWithMalformedUrl() {
Registered: Sat Dec 20 13:44:44 UTC 2025 - Last Modified: Thu Aug 14 05:31:44 UTC 2025 - 8.5K bytes - Viewed (0) -
src/main/java/jcifs/smb/SmbFileDirectoryLeasingExtension.java
* * @param smbFile the SmbFile directory to list * @return array of SmbFile objects representing the directory contents * @throws SmbException if an error occurs */ public static SmbFile[] listFilesWithLeasing(SmbFile smbFile) throws SmbException { if (!smbFile.isDirectory()) { throw new SmbException("Not a directory: " + smbFile.getPath()); }Registered: Sat Dec 20 13:44:44 UTC 2025 - Last Modified: Sat Aug 23 02:21:31 UTC 2025 - 7.1K bytes - Viewed (0) -
src/test/java/jcifs/smb/ShareEnumIteratorTest.java
class ShareEnumIteratorTest { @Mock ResourceFilter filter; // Helper to create a parent SmbFile that does not hit the network for simple operations private SmbFile newParent() throws MalformedURLException { // Valid share URL with trailing slash; constructing does not perform I/O return new SmbFile("smb://test-server/share/"); } // Helper to create a minimal FileEntry mockRegistered: Sat Dec 20 13:44:44 UTC 2025 - Last Modified: Thu Aug 14 05:31:44 UTC 2025 - 8.1K bytes - Viewed (0) -
src/test/java/jcifs/smb1/smb1/SmbShareInfoTest.java
assertEquals(SmbFile.TYPE_PRINTER, hiddenPrinter.getType()); } /** * Test of getAttributes method, of class SmbShareInfo. */ @Test void testGetAttributes() { SmbShareInfo instance = new SmbShareInfo(); int expResult = SmbFile.ATTR_READONLY | SmbFile.ATTR_DIRECTORY; int result = instance.getAttributes(); assertEquals(expResult, result); }
Registered: Sat Dec 20 13:44:44 UTC 2025 - Last Modified: Thu Aug 14 05:31:44 UTC 2025 - 5K bytes - Viewed (0)