Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 13 for deleteIfExists (0.06 sec)

  1. 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.
       */
    Registered: Fri Dec 26 11:42:13 UTC 2025
    - Last Modified: Wed May 28 23:28:25 UTC 2025
    - 34.7K bytes
    - Viewed (0)
  2. 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);
            }
    Registered: Sat Dec 20 13:44:44 UTC 2025
    - Last Modified: Sun Aug 24 00:49:49 UTC 2025
    - 13K bytes
    - Viewed (0)
  3. impl/maven-core/src/main/java/org/apache/maven/internal/transformation/impl/TransformedArtifact.java

            String result;
            ModelSource src = sourcePathProvider.get();
            if (src == null) {
                Files.deleteIfExists(target);
                result = null;
            } else if (!Files.exists(src.getPath())) {
                Files.deleteIfExists(target);
                result = "";
            } else {
                String current = ChecksumAlgorithmHelper.calculate(
    Registered: Sun Dec 28 03:35:09 UTC 2025
    - Last Modified: Thu Nov 06 18:32:25 UTC 2025
    - 4.8K bytes
    - Viewed (0)
  4. 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
    Registered: Sat Dec 20 09:13:53 UTC 2025
    - Last Modified: Thu Nov 20 13:34:13 UTC 2025
    - 3.9K bytes
    - Viewed (0)
  5. 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
                                    }
                                });
    Registered: Sun Dec 28 03:35:09 UTC 2025
    - Last Modified: Tue Nov 18 10:39:17 UTC 2025
    - 4.9K bytes
    - Viewed (0)
  6. impl/maven-cli/src/test/java/org/apache/maven/cling/invoker/mvnup/goals/CheckTest.java

                                .sorted(java.util.Comparator.reverseOrder())
                                .forEach(path -> {
                                    try {
                                        Files.deleteIfExists(path);
                                    } catch (Exception e) {
                                        // Ignore cleanup errors
                                    }
                                });
    Registered: Sun Dec 28 03:35:09 UTC 2025
    - Last Modified: Sat Jun 07 06:22:47 UTC 2025
    - 4.9K bytes
    - Viewed (0)
  7. impl/maven-core/src/test/java/org/apache/maven/DefaultMavenTest.java

                mavenProjectHelper.attachArtifact(mavenProject, "java-source", artifactFile);
                assertEquals(1, mavenProject.getAttachedArtifacts().size());
            } finally {
                Files.deleteIfExists(artifactFile.toPath());
            }
        }
    Registered: Sun Dec 28 03:35:09 UTC 2025
    - Last Modified: Fri Mar 21 04:56:21 UTC 2025
    - 4.3K bytes
    - Viewed (0)
  8. impl/maven-core/src/main/java/org/apache/maven/execution/DefaultBuildResumptionDataRepository.java

        @Override
        public void removeResumptionData(MavenProject rootProject) {
            Path resumeProperties = Paths.get(rootProject.getBuild().getDirectory(), RESUME_PROPERTIES_FILENAME);
            try {
                Files.deleteIfExists(resumeProperties);
            } catch (IOException e) {
                LOGGER.warn("Could not delete {} file. ", RESUME_PROPERTIES_FILENAME, e);
            }
        }
    
    Registered: Sun Dec 28 03:35:09 UTC 2025
    - Last Modified: Tue Feb 11 16:38:19 UTC 2025
    - 4.9K bytes
    - Viewed (0)
  9. 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.
         *
    Registered: Sat Dec 20 09:19:18 UTC 2025
    - Last Modified: Fri Nov 28 16:29:12 UTC 2025
    - 7.1K bytes
    - Viewed (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. */
    Registered: Fri Dec 26 11:42:13 UTC 2025
    - Last Modified: Mon May 05 16:01:00 UTC 2025
    - 10.1K bytes
    - Viewed (0)
Back to top