Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 16 for createTempFile (0.26 sec)

  1. android/guava-tests/test/com/google/common/io/FilesTest.java

        File temp1 = createTempFile();
        File temp2 = createTempFile();
    
        Files.copy(i18nFile, temp1);
        moveHelper(true, temp1, temp2);
        assertTrue(Files.equal(temp2, i18nFile));
      }
    
      public void testMoveViaCopy() throws IOException {
        File i18nFile = getTestFile("i18n.txt");
        File temp1 = createTempFile();
        File temp2 = createTempFile();
    
        Files.copy(i18nFile, temp1);
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Wed Sep 06 17:04:31 GMT 2023
    - 22.2K bytes
    - Viewed (0)
  2. guava-tests/test/com/google/common/io/FilesTest.java

        File temp1 = createTempFile();
        File temp2 = createTempFile();
    
        Files.copy(i18nFile, temp1);
        moveHelper(true, temp1, temp2);
        assertTrue(Files.equal(temp2, i18nFile));
      }
    
      public void testMoveViaCopy() throws IOException {
        File i18nFile = getTestFile("i18n.txt");
        File temp1 = createTempFile();
        File temp2 = createTempFile();
    
        Files.copy(i18nFile, temp1);
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Wed Sep 06 17:04:31 GMT 2023
    - 22.2K bytes
    - Viewed (0)
  3. android/guava/src/com/google/common/io/TempFileCreator.java

          } catch (IOException e) {
            throw new IllegalStateException("Failed to create directory", e);
          }
        }
    
        @Override
        File createTempFile(String prefix) throws IOException {
          return java.nio.file.Files.createTempFile(
                  Paths.get(JAVA_IO_TMPDIR.value()),
                  /* prefix= */ prefix,
                  /* suffix= */ null,
                  filePermissions.get())
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Fri Oct 06 17:11:11 GMT 2023
    - 12.5K bytes
    - Viewed (0)
  4. guava-tests/test/com/google/common/io/MoreFilesTest.java

                  }
                  Files.deleteIfExists(dir);
                  return FileVisitResult.CONTINUE;
                }
              });
        }
      }
    
      private Path createTempFile() throws IOException {
        return Files.createTempFile(tempDir, "test", ".test");
      }
    
      public void testByteSource_size_ofDirectory() throws IOException {
        try (FileSystem fs = Jimfs.newFileSystem(Configuration.unix())) {
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Mon Jan 29 22:57:05 GMT 2024
    - 27.2K bytes
    - Viewed (0)
  5. android/guava-tests/test/com/google/common/io/IoTestCase.java

      /**
       * Creates a new temp file in the temp directory returned by {@link #getTempDir()}. The file will
       * be deleted in the tear-down for this test.
       */
      protected final File createTempFile() throws IOException {
        return File.createTempFile("test", null, getTempDir());
      }
    
      /** Returns a byte array of length size that has values 0 .. size - 1. */
      static byte[] newPreFilledByteArray(int size) {
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Wed Apr 19 19:24:36 GMT 2023
    - 5.6K bytes
    - Viewed (0)
  6. guava-tests/test/com/google/common/io/SourceSinkFactories.java

        private final ThreadLocal<File> fileThreadLocal = new ThreadLocal<>();
    
        protected File createFile() throws IOException {
          File file = File.createTempFile("SinkSourceFile", "txt");
          fileThreadLocal.set(file);
          return file;
        }
    
        protected File getFile() {
          return fileThreadLocal.get();
        }
    
    Java
    - Registered: Fri Apr 12 12:43:09 GMT 2024
    - Last Modified: Thu Sep 09 17:57:59 GMT 2021
    - 17.9K bytes
    - Viewed (0)
  7. guava-tests/test/com/google/common/io/IoTestCase.java

      /**
       * Creates a new temp file in the temp directory returned by {@link #getTempDir()}. The file will
       * be deleted in the tear-down for this test.
       */
      protected final File createTempFile() throws IOException {
        return File.createTempFile("test", null, getTempDir());
      }
    
      /** Returns a byte array of length size that has values 0 .. size - 1. */
      static byte[] newPreFilledByteArray(int size) {
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Wed Apr 19 19:24:36 GMT 2023
    - 5.6K bytes
    - Viewed (0)
  8. android/guava-tests/test/com/google/common/io/ResourcesTest.java

        // Check that we can find a resource if it is visible to the context class
        // loader, even if it is not visible to the loader of the Resources class.
    
        File tempFile = createTempFile();
        PrintWriter writer = new PrintWriter(tempFile, "UTF-8");
        writer.println("rud a chur ar an méar fhada");
        writer.close();
    
        // First check that we can't find it without setting the context loader.
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Wed Sep 06 17:04:31 GMT 2023
    - 6.8K bytes
    - Viewed (0)
  9. android/guava/src/com/google/common/io/FileBackedOutputStream.java

       * so.
       */
      @GuardedBy("this")
      private void update(int len) throws IOException {
        if (memory != null && (memory.getCount() + len > fileThreshold)) {
          File temp = TempFileCreator.INSTANCE.createTempFile("FileBackedOutputStream");
          if (resetOnFinalize) {
            // Finalizers are not guaranteed to be called on system shutdown;
            // this is insurance.
            temp.deleteOnExit();
          }
          try {
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Thu Feb 22 17:40:56 GMT 2024
    - 8.2K bytes
    - Viewed (0)
  10. android/guava-tests/test/com/google/common/reflect/ClassPathTest.java

      }
    
      @AndroidIncompatible // ClassPath is documented as not supporting Android
    
      public void testScan_classPathCycle() throws IOException {
        File jarFile = File.createTempFile("with_circular_class_path", ".jar");
        try {
          writeSelfReferencingJarFile(jarFile, "test.txt");
          assertThat(
                  new ClassPath.LocationInfo(jarFile, ClassPathTest.class.getClassLoader())
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Fri Jul 07 16:50:33 GMT 2023
    - 24.9K bytes
    - Viewed (0)
Back to top