Search Options

Results per page
Sort
Preferred Languages
Advance

Results 21 - 30 of 94 for SmbFile (0.03 sec)

  1. 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: Sat Dec 20 13:44:44 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 10.7K bytes
    - Viewed (0)
  2. 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: Sat Dec 20 13:44:44 UTC 2025
    - Last Modified: Sat Aug 30 09:24:52 UTC 2025
    - 6.2K bytes
    - Viewed (0)
  3. 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.
    Registered: Sat Dec 20 13:44:44 UTC 2025
    - Last Modified: Sat Aug 16 01:32:48 UTC 2025
    - 11K bytes
    - Viewed (0)
  4. src/main/java/jcifs/smb1/smb1/SmbFileInputStream.java

            this(new SmbFile(url));
        }
    
        /**
         * Creates an {@link java.io.InputStream} for reading bytes from a file on
         * an SMB server represented by the {@link jcifs.smb1.smb1.SmbFile} parameter. See
         * {@link jcifs.smb1.smb1.SmbFile} for a detailed description and examples of
         * the smb URL syntax.
         *
         * @param file An <code>SmbFile</code> specifying the file to read from
    Registered: Sat Dec 20 13:44:44 UTC 2025
    - Last Modified: Sat Aug 16 01:32:48 UTC 2025
    - 9.4K bytes
    - Viewed (0)
  5. src/test/java/jcifs/smb1/smb1/DosFileFilterTest.java

        @BeforeEach
        public void setup() {
            filter = new DosFileFilter("*", SmbFile.ATTR_NORMAL);
        }
    
        @Test
        public void testAcceptReturnsTrueWhenAttributesMatch() throws Exception {
            SmbFile file = mock(SmbFile.class);
            when(file.getAttributes()).thenReturn(SmbFile.ATTR_NORMAL);
            assertTrue(filter.accept(file), "Attributes match should be accepted");
    Registered: Sat Dec 20 13:44:44 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 1.8K bytes
    - Viewed (0)
  6. src/main/java/jcifs/smb/SmbEnumerationUtil.java

                final List<SmbFile> list = new ArrayList<>();
                while (it.hasNext()) {
                    try (SmbResource n = it.next()) {
                        if (n instanceof SmbFile) {
                            list.add((SmbFile) n);
                        }
                    }
                }
                return list.toArray(new SmbFile[list.size()]);
            } catch (final CIFSException e) {
    Registered: Sat Dec 20 13:44:44 UTC 2025
    - Last Modified: Thu Aug 14 07:14:38 UTC 2025
    - 12.3K bytes
    - Viewed (0)
  7. src/test/java/jcifs/smb1/smb1/SmbFilenameFilterTest.java

        void acceptReturnsTrueWhenNameMatches() throws Exception {
            SmbFile dir = Mockito.mock(SmbFile.class);
            SmbFilenameFilter filter = (d, n) -> n.equalsIgnoreCase("hello.txt");
            assertTrue(filter.accept(dir, "Hello.TXT"));
        }
    
        @Test
        void acceptReturnsFalseWhenNameDoesNotMatch() throws Exception {
            SmbFile dir = Mockito.mock(SmbFile.class);
    Registered: Sat Dec 20 13:44:44 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 1.6K bytes
    - Viewed (0)
  8. 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);
            }
    
            @Test
    Registered: Sat Dec 20 13:44:44 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 17.1K bytes
    - Viewed (0)
  9. 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());
    Registered: Sat Dec 20 13:44:44 UTC 2025
    - Last Modified: Sat Aug 23 01:47:47 UTC 2025
    - 12.3K bytes
    - Viewed (0)
  10. src/main/java/jcifs/smb1/http/NetworkExplorer.java

                    return;
                }
            }
    
            try {
                SmbFile file;
    
                if (ntlm != null) {
                    file = new SmbFile("smb1:/" + pathInfo, ntlm);
                } else if (server == null) {
                    file = new SmbFile("smb1://");
                } else {
                    file = new SmbFile("smb1:/" + pathInfo);
                }
    
                if (file.isDirectory()) {
    Registered: Sat Dec 20 13:44:44 UTC 2025
    - Last Modified: Sun Aug 31 08:00:57 UTC 2025
    - 22.6K bytes
    - Viewed (0)
Back to top