Search Options

Display Count
Sort
Preferred Language
Advanced Search

Results 1 - 8 of 8 for deleteIfExists (0.08 seconds)

  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.
       */
    Created: Fri Dec 26 11:42:13 GMT 2025
    - Last Modified: Wed May 28 23:28:25 GMT 2025
    - 34.7K bytes
    - Click Count (0)
  2. 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(
    Created: Sun Dec 28 03:35:09 GMT 2025
    - Last Modified: Thu Nov 06 18:32:25 GMT 2025
    - 4.8K bytes
    - Click Count (0)
  3. 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 Dec 28 03:35:09 GMT 2025
    - Last Modified: Tue Nov 18 10:39:17 GMT 2025
    - 4.9K bytes
    - Click Count (0)
  4. 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());
            }
        }
    Created: Sun Dec 28 03:35:09 GMT 2025
    - Last Modified: Fri Mar 21 04:56:21 GMT 2025
    - 4.3K bytes
    - Click Count (0)
  5. 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
                                    }
                                });
    Created: Sun Dec 28 03:35:09 GMT 2025
    - Last Modified: Sat Jun 07 06:22:47 GMT 2025
    - 4.9K bytes
    - Click Count (0)
  6. 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);
            }
        }
    
    Created: Sun Dec 28 03:35:09 GMT 2025
    - Last Modified: Tue Feb 11 16:38:19 GMT 2025
    - 4.9K bytes
    - Click Count (0)
  7. 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 Dec 26 11:42:13 GMT 2025
    - Last Modified: Mon May 05 16:01:00 GMT 2025
    - 10.1K bytes
    - Click Count (0)
  8. impl/maven-core/src/main/java/org/apache/maven/ReactorReader.java

                if (!(Files.isRegularFile(target) && Files.isSameFile(source, target))) {
                    Files.createDirectories(target.getParent());
                    try {
                        Files.deleteIfExists(target);
                        Files.createLink(target, source);
                    } catch (UnsupportedOperationException | IOException suppressed) {
    Created: Sun Dec 28 03:35:09 GMT 2025
    - Last Modified: Mon Dec 15 11:20:38 GMT 2025
    - 24.4K bytes
    - Click Count (0)
Back to Top