Search Options

Display Count
Sort
Preferred Language
Advanced Search

Results 11 - 20 of 23 for deleteIfExists (0.08 seconds)

  1. 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)
  2. src/main/java/org/codelibs/fess/helper/ThemeHelper.java

                        Files.delete(f);
                    } catch (final IOException e) {
                        logger.warn("Failed to delete: path={}", f, e);
                    }
                });
                Files.deleteIfExists(dir);
            } catch (final IOException e) {
                logger.warn("Failed to delete: path={}", dir, e);
            }
        }
    
        /**
         * Gets the JAR file path for the given artifact.
         *
    Created: Tue Mar 31 13:07:34 GMT 2026
    - Last Modified: Fri Nov 28 16:29:12 GMT 2025
    - 7.1K bytes
    - Click Count (0)
  3. src/main/java/org/codelibs/curl/io/ContentOutputStream.java

            } finally {
                if (!isInMemory() && !done) {
                    final File file = super.getFile();
                    if (file != null) {
                        try {
                            Files.deleteIfExists(file.toPath());
                        } catch (final IOException e) {
                            // Log the error but don't throw to avoid masking exceptions from the main operation
    Created: Thu Apr 02 15:34:12 GMT 2026
    - Last Modified: Thu Nov 20 13:34:13 GMT 2025
    - 3.9K bytes
    - Click Count (0)
  4. impl/maven-cli/src/test/java/org/apache/maven/cling/invoker/mvnup/goals/ApplyTest.java

                                .sorted(java.util.Comparator.reverseOrder())
                                .forEach(path -> {
                                    try {
                                        Files.deleteIfExists(path);
                                    } catch (Exception e) {
                                        // Ignore cleanup errors
                                    }
                                });
    Created: Sun Apr 05 03:35:12 GMT 2026
    - Last Modified: Tue Nov 18 10:39:17 GMT 2025
    - 4.9K bytes
    - Click Count (0)
  5. 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)
  6. 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)
  7. src/test/java/org/codelibs/fess/job/IndexExportJobTest.java

                assertEquals("original", Files.readString(outsideTarget));
            } finally {
                Files.deleteIfExists(tempDir.resolve("example.com/page.html"));
                Files.deleteIfExists(tempDir.resolve("example.com"));
                deleteRecursive(outsideDir);
            }
        }
    Created: Tue Mar 31 13:07:34 GMT 2026
    - Last Modified: Sun Mar 15 09:08:38 GMT 2026
    - 66.1K bytes
    - Click Count (0)
  8. 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)
  9. src/main/java/org/codelibs/fess/thumbnail/impl/HtmlTagBasedGenerator.java

                    }
                } finally {
                    if (!created) {
                        updateThumbnailField(thumbnailId, StringUtil.EMPTY);
                        try {
                            Files.deleteIfExists(outputFile.toPath());
                        } 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
    - 10.6K bytes
    - Click Count (0)
  10. okhttp/src/commonJvmAndroid/kotlin/okhttp3/internal/-UtilCommon.kt

          delete(file)
          return true
        } catch (_: IOException) {
        }
      }
      delete(file)
      return false
    }
    
    /** Delete file we expect but don't require to exist. */
    internal fun FileSystem.deleteIfExists(path: Path) {
      try {
        delete(path)
      } catch (fnfe: FileNotFoundException) {
        return
      }
    }
    
    /** Tolerant delete, try to clear as many files as possible even after a failure. */
    Created: Fri Apr 03 11:42:14 GMT 2026
    - Last Modified: Mon May 05 16:01:00 GMT 2025
    - 10.1K bytes
    - Click Count (0)
Back to Top