Search Options

Results per page
Sort
Preferred Languages
Advance

Results 11 - 20 of 94 for SmbFile (0.17 sec)

  1. 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: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 3.2K bytes
    - Viewed (0)
  2. 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: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 5.4K bytes
    - Viewed (0)
  3. fess-crawler/src/main/java/org/codelibs/fess/crawler/client/smb/SmbClient.java

            responseData.setUrl(filePath);
    
            SmbFile file = null;
            final SmbAuthentication smbAuthentication = smbAuthenticationHolder.get(filePath);
            if (logger.isDebugEnabled()) {
                logger.debug("Creating SmbFile: {} - {}", filePath, smbAuthentication);
            }
            try {
                if (smbAuthentication == null) {
                    file = new SmbFile(filePath, cifsContext);
                } else {
    Registered: Sun Sep 21 03:50:09 UTC 2025
    - Last Modified: Thu Sep 18 09:30:45 UTC 2025
    - 22.5K bytes
    - Viewed (0)
  4. src/main/java/jcifs/smb1/smb1/SmbComOpenAndX.java

            // fileAttributes
            fileAttributes = 0;
    
            // openFunction
            if ((flags & SmbFile.O_TRUNC) == SmbFile.O_TRUNC) {
                // truncate the file
                if ((flags & SmbFile.O_CREAT) == SmbFile.O_CREAT) {
                    // create it if necessary
                    openFunction = OPEN_FN_TRUNC | OPEN_FN_CREATE;
                } else {
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 07:14:38 UTC 2025
    - 5.6K bytes
    - Viewed (0)
  5. src/main/java/jcifs/smb1/smb1/SmbRandomAccessFile.java

         */
        public SmbRandomAccessFile(final SmbFile file, final String mode) throws SmbException, MalformedURLException, UnknownHostException {
            this.file = file;
            if (mode.equals("r")) {
                this.openFlags = SmbFile.O_CREAT | SmbFile.O_RDONLY;
            } else if (mode.equals("rw")) {
                this.openFlags = SmbFile.O_CREAT | SmbFile.O_RDWR | SmbFile.O_APPEND;
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Sat Aug 16 01:32:48 UTC 2025
    - 14.1K bytes
    - Viewed (0)
  6. 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.
    
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 10.7K bytes
    - Viewed (0)
  7. README.md

    ### Basic Usage
    
    ```java
    import jcifs.CIFSContext;
    import jcifs.context.SingletonContext;
    import jcifs.smb.SmbFile;
    
    // Using default context
    CIFSContext context = SingletonContext.getInstance();
    
    // Access a file (encryption is transparent - automatically used if server requires it)
    try (SmbFile file = new SmbFile("smb://server/share/file.txt", context)) {
        if (file.exists()) {
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Sat Aug 30 09:24:52 UTC 2025
    - 6.2K bytes
    - Viewed (0)
  8. 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 mock
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 8.1K bytes
    - Viewed (0)
  9. 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: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 5K bytes
    - Viewed (0)
  10. 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: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 8.5K bytes
    - Viewed (0)
Back to top