Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 14 for createNewFile (0.08 sec)

  1. src/test/java/jcifs/smb/SmbFileTest.java

            void testCreateNewFileWhenExists() throws SmbException, IOException {
                // Arrange
                doReturn(true).when(smbFile).exists();
                doNothing().when(smbFile).createNewFile();
    
                // Act
                smbFile.createNewFile();
    
                // Assert - should not throw exception when file exists
            }
        }
    
        @Nested
        class WhenHandlingConnections {
    
            @Test
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 20.8K bytes
    - Viewed (0)
  2. compat/maven-compat/src/test/java/org/apache/maven/repository/legacy/DefaultUpdateCheckManagerTest.java

            touchFile.delete();
    
            assertTrue(updateCheckManager.isUpdateRequired(a, remoteRepository));
    
            file.getParentFile().mkdirs();
            file.createNewFile();
            updateCheckManager.touch(a, remoteRepository, null);
    
            assertFalse(updateCheckManager.isUpdateRequired(a, remoteRepository));
    
            assertNull(
    Registered: Sun Sep 07 03:35:12 UTC 2025
    - Last Modified: Fri Oct 25 12:31:46 UTC 2024
    - 8.7K bytes
    - Viewed (0)
  3. src/test/java/jcifs/smb/SmbFileIntegrationTest.java

            String dirPath = baseUrl + "shared/listdir_" + timestamp + "/";
            SmbFile file1 = new SmbFile(dirPath + "file1.txt", fileContext);
            file1.createNewFile();
            file1.close();
    
            SmbFile file2 = new SmbFile(dirPath + "file2.txt", fileContext);
            file2.createNewFile();
            file2.close();
    
            SmbFile subdir = new SmbFile(dirPath + "subdir/", fileContext);
            subdir.mkdir();
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Sat Aug 30 05:58:03 UTC 2025
    - 56K bytes
    - Viewed (0)
  4. src/test/java/jcifs/SmbResourceTest.java

                assertNotNull(clazz.getMethod("canWrite"), "Should have canWrite method");
                assertNotNull(clazz.getMethod("length"), "Should have length method");
                assertNotNull(clazz.getMethod("createNewFile"), "Should have createNewFile method");
                assertNotNull(clazz.getMethod("mkdir"), "Should have mkdir method");
                assertNotNull(clazz.getMethod("mkdirs"), "Should have mkdirs method");
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 35K bytes
    - Viewed (0)
  5. compat/maven-compat/src/test/java/org/apache/maven/artifact/AbstractArtifactComponentTestCase.java

            String path = "target/test-repositories/" + component() + "/bad-local-repository";
    
            File f = new File(getBasedir(), path);
    
            f.createNewFile();
    
            return artifactRepositoryFactory.createArtifactRepository(
                    "test", "file://" + f.getPath(), repoLayout, null, null);
        }
    
        protected String getRepositoryLayout() {
    Registered: Sun Sep 07 03:35:12 UTC 2025
    - Last Modified: Fri Mar 21 04:56:21 UTC 2025
    - 13.8K bytes
    - Viewed (0)
  6. docs/smb3-features/02-persistent-handles-design.md

        CIFSContext context = getTestContext();
        context.getConfig().setProperty("jcifs.smb.client.useDurableHandles", "true");
        
        SmbFile file = new SmbFile("smb://server/share/test.txt", context);
        file.createNewFile();
        
        // Write some data
        try (OutputStream os = file.getOutputStream()) {
            os.write("test data".getBytes());
        }
        
        // Simulate network disconnection
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Sat Aug 16 02:53:50 UTC 2025
    - 31.6K bytes
    - Viewed (0)
  7. src/test/java/jcifs/netbios/LmhostsTest.java

        void testIOExceptionDuringRead() throws IOException {
            // Create a file that exists but will cause an IOException when read
            File lmhostsFile = tempDir.resolve("lmhosts").toFile();
            lmhostsFile.createNewFile();
    
            // Make file unreadable on Unix-like systems
            boolean isWindows = System.getProperty("os.name").toLowerCase().contains("windows");
            if (!isWindows) {
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 18.2K bytes
    - Viewed (0)
  8. docs/smb3-features/01-smb3-lease-design.md

        context.getConfig().setProperty("jcifs.smb.client.useLeases", "true");
        
        try (SmbFile file = new SmbFile("smb://server/share/test.txt", context)) {
            // Open file with lease
            file.createNewFile();
            
            // Verify lease was granted
            assertTrue(file.canCacheRead());
            
            // Write should be cached
            try (OutputStream os = file.getOutputStream()) {
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Sat Aug 16 02:53:50 UTC 2025
    - 22K bytes
    - Viewed (0)
  9. docs/smb3-features/06-witness-protocol-design.md

        CIFSContext context = getTestContext();
        context.getConfig().setProperty("jcifs.smb.client.useWitness", "true");
        
        SmbFile file = new SmbFile("smb://cluster-server/share/test.txt", context);
        file.createNewFile();
        
        // Monitor for witness notifications
        TestWitnessListener listener = new TestWitnessListener();
        
        // Simulate cluster failover (would require test environment setup)
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Sat Aug 16 02:53:50 UTC 2025
    - 42K bytes
    - Viewed (0)
  10. docs/smb3-features/04-directory-leasing-design.md

        
        // Get initial listing (establishes cache)
        SmbFile[] initialFiles = dir.listFiles();
        
        // Create new file
        testFile.createNewFile();
        
        // Wait for change notification
        Thread.sleep(2000);
        
        // Cache should be invalidated, new listing should include new file
        SmbFile[] updatedFiles = dir.listFiles();
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Sat Aug 16 02:53:50 UTC 2025
    - 36.2K bytes
    - Viewed (0)
Back to top