Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 15 for createNewFile (0.14 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. src/test/java/org/codelibs/fess/thumbnail/ThumbnailManagerTest.java

            dir1.mkdirs();
            File expiredFile = new File(dir1, "expired.png");
            expiredFile.createNewFile();
            expiredFile.setLastModified(System.currentTimeMillis() - 10000L);
    
            File recentFile = new File(dir1, "recent.png");
            recentFile.createNewFile();
            recentFile.setLastModified(System.currentTimeMillis());
    
            // Override purge to avoid client operations
    Registered: Thu Sep 04 12:52:25 UTC 2025
    - Last Modified: Tue Aug 19 14:09:36 UTC 2025
    - 18.7K bytes
    - Viewed (0)
  3. 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)
  4. src/test/java/org/codelibs/fess/job/ExecJobTest.java

            File jar1 = new File(libDir, "test1.jar");
            File jar2 = new File(libDir, "test2.JAR");
            File notJar = new File(libDir, "test.txt");
            assertTrue(jar1.createNewFile());
            assertTrue(jar2.createNewFile());
            assertTrue(notJar.createNewFile());
    
            execJob.testAppendJarFile(":", buf, libDir, "/base/path/");
    
            String result = buf.toString();
    Registered: Thu Sep 04 12:52:25 UTC 2025
    - Last Modified: Tue Aug 19 14:09:36 UTC 2025
    - 24.5K 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. src/test/java/org/codelibs/fess/thumbnail/ThumbnailGeneratorTest.java

                    return false;
                }
    
                // Simulate thumbnail generation
                try {
                    if (!outputFile.exists()) {
                        outputFile.createNewFile();
                    }
                    // Write some dummy content to simulate actual thumbnail
                    Files.write(outputFile.toPath(), ("thumbnail-" + thumbnailId).getBytes());
                    return true;
    Registered: Thu Sep 04 12:52:25 UTC 2025
    - Last Modified: Tue Aug 19 14:09:36 UTC 2025
    - 11.4K bytes
    - Viewed (0)
  7. 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)
  8. 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)
  9. 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)
  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