Search Options

Display Count
Sort
Preferred Language
Advanced Search

Results 1 - 10 of 15 for deleteIfExists (0.07 seconds)

  1. src/test/java/org/codelibs/fess/thumbnail/impl/CommandGeneratorTest.java

        public void test_atomicDeleteIfExists_existingFile() throws Exception {
            // Test that Files.deleteIfExists deletes existing file atomically
            Path tempFile = Files.createTempFile("toctou_cmd_test", ".tmp");
            try {
                assertTrue(Files.exists(tempFile));
    
                boolean deleted = Files.deleteIfExists(tempFile);
    
                assertTrue(deleted);
                assertFalse(Files.exists(tempFile));
    Created: Tue Mar 31 13:07:34 GMT 2026
    - Last Modified: Fri Mar 13 23:01:26 GMT 2026
    - 27.8K bytes
    - Click Count (0)
  2. src/test/java/org/codelibs/fess/thumbnail/ThumbnailManagerTest.java

            // Test that Files.deleteIfExists works correctly for no-image marker files
            Path noImageFile = Files.createTempFile("noimage_test", ".noimage");
            try {
                assertTrue(Files.exists(noImageFile));
    
                // Atomic delete should succeed
                boolean deleted = Files.deleteIfExists(noImageFile);
    
                assertTrue(deleted);
    Created: Tue Mar 31 13:07:34 GMT 2026
    - Last Modified: Fri Mar 13 23:01:26 GMT 2026
    - 20.4K bytes
    - Click Count (0)
  3. src/test/java/org/codelibs/fess/util/ThreadDumpUtilTest.java

                assertTrue("File should contain content", Files.size(tempFile) > 0);
    
            } finally {
                Files.deleteIfExists(tempFile);
                Files.deleteIfExists(tempDir);
            }
        }
    Created: Tue Mar 31 13:07:34 GMT 2026
    - Last Modified: Fri Mar 13 23:01:26 GMT 2026
    - 15.6K bytes
    - Click Count (0)
  4. okhttp/src/commonJvmAndroid/kotlin/okhttp3/internal/cache/DiskLruCache.kt

            }
          } else {
            entry.currentEditor = null
            for (t in 0 until valueCount) {
              fileSystem.deleteIfExists(entry.cleanFiles[t])
              fileSystem.deleteIfExists(entry.dirtyFiles[t])
            }
            i.remove()
          }
        }
      }
    
      /**
       * Creates a new journal that omits redundant information. This replaces the current journal if it
       * exists.
       */
    Created: Fri Apr 03 11:42:14 GMT 2026
    - Last Modified: Tue Jan 27 09:00:39 GMT 2026
    - 34.7K bytes
    - Click Count (0)
  5. src/main/java/org/codelibs/fess/thumbnail/impl/CommandGenerator.java

                    if (executeCommand(thumbnailId, cmdList) != 0) {
                        logger.warn("Failed to execute command for thumbnail ID: {}", thumbnailId);
                        try {
                            Files.deleteIfExists(outputPath2);
                        } catch (final IOException e) {
                            logger.warn("Failed to delete output file: {}", outputFile.getAbsolutePath(), e);
                        }
    Created: Tue Mar 31 13:07:34 GMT 2026
    - Last Modified: Thu Jan 01 12:47:47 GMT 2026
    - 16.6K bytes
    - Click Count (0)
  6. src/main/java/jcifs/internal/smb2/persistent/PersistentHandleManager.java

            if (info.getType() != HandleType.PERSISTENT) {
                return;
            }
    
            Path handleFile = stateDirectory.resolve(info.getCreateGuid().toString() + ".handle");
            try {
                Files.deleteIfExists(handleFile);
                log.debug("Removed persisted handle file: {}", handleFile);
            } catch (IOException e) {
                log.error("Failed to remove persisted handle file: " + handleFile, e);
            }
    Created: Sun Apr 05 00:10:12 GMT 2026
    - Last Modified: Sun Aug 24 00:49:49 GMT 2025
    - 13K bytes
    - Click Count (0)
  7. guava-tests/test/com/google/common/io/MoreFilesTest.java

              new SimpleFileVisitor<Path>() {
                @Override
                public FileVisitResult visitFile(Path file, BasicFileAttributes attrs)
                    throws IOException {
                  Files.deleteIfExists(file);
                  return FileVisitResult.CONTINUE;
                }
    
                @Override
                public FileVisitResult postVisitDirectory(Path dir, IOException exc)
                    throws IOException {
    Created: Fri Apr 03 12:43:13 GMT 2026
    - Last Modified: Tue Mar 17 19:26:39 GMT 2026
    - 27.5K bytes
    - Click Count (0)
  8. android/guava-tests/test/com/google/common/io/MoreFilesTest.java

                  Files.deleteIfExists(file);
                  return FileVisitResult.CONTINUE;
                }
    
                @Override
                public FileVisitResult postVisitDirectory(Path dir, IOException exc)
                    throws IOException {
                  if (exc != null) {
                    return FileVisitResult.TERMINATE;
                  }
                  Files.deleteIfExists(dir);
    Created: Fri Apr 03 12:43:13 GMT 2026
    - Last Modified: Tue Mar 17 19:26:39 GMT 2026
    - 26.6K bytes
    - Click Count (0)
  9. docs/smb3-features/02-persistent-handles-design.md

            if (info.type != HandleType.PERSISTENT) {
                return;
            }
            
            Path handleFile = stateDirectory.resolve(info.createGuid.toString() + ".handle");
            try {
                Files.deleteIfExists(handleFile);
            } catch (IOException e) {
                log.error("Failed to remove persisted handle", e);
            }
        }
        
        private void loadPersistedHandles() {
    Created: Sun Apr 05 00:10:12 GMT 2026
    - Last Modified: Sat Aug 16 02:53:50 GMT 2025
    - 31.6K bytes
    - Click Count (0)
  10. build-conventions/src/main/java/org/elasticsearch/gradle/internal/conventions/precommit/LicenseHeadersTask.java

            return substringLicenseMatcher;
        }
    
        private ClaimStatistic generateReport(ReportConfiguration config, File xmlReportFile) {
            try {
                Files.deleteIfExists(reportFile.toPath());
                BufferedWriter bufferedWriter = new BufferedWriter(new FileWriter(xmlReportFile));
                return toXmlReportFile(config, bufferedWriter);
    Created: Wed Apr 08 16:19:15 GMT 2026
    - Last Modified: Thu Sep 09 18:53:35 GMT 2021
    - 10.6K bytes
    - Click Count (0)
Back to Top