Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 13 for createTempDir (0.2 sec)

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

    /**
     * Unit test for {@link Files#createTempDir}.
     *
     * @author Chris Nokleberg
     */
    
    @SuppressWarnings("deprecation") // tests of a deprecated method
    public class FilesCreateTempDirTest extends TestCase {
      public void testCreateTempDir() throws IOException {
        if (JAVA_IO_TMPDIR.value().equals("/sdcard")) {
          assertThrows(IllegalStateException.class, Files::createTempDir);
          return;
        }
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Fri Oct 06 17:11:11 GMT 2023
    - 4.3K bytes
    - Viewed (0)
  2. android/guava-tests/test/com/google/common/io/FilesCreateTempDirTest.java

    /**
     * Unit test for {@link Files#createTempDir}.
     *
     * @author Chris Nokleberg
     */
    
    @SuppressWarnings("deprecation") // tests of a deprecated method
    public class FilesCreateTempDirTest extends TestCase {
      public void testCreateTempDir() throws IOException {
        if (JAVA_IO_TMPDIR.value().equals("/sdcard")) {
          assertThrows(IllegalStateException.class, Files::createTempDir);
          return;
        }
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Fri Oct 06 17:11:11 GMT 2023
    - 4.3K bytes
    - Viewed (0)
  3. guava-tests/test/com/google/common/io/IoTestCase.java

          }
        }
    
        if (testDir == null) {
          // testdata resources aren't file:// urls, so create a directory to store them in and then
          // copy the resources to the filesystem as needed
          testDir = createTempDir();
        }
    
        return testDir;
      }
    
      /** Returns the file with the given name under the testdata directory. */
      protected final @Nullable File getTestFile(String name) throws IOException {
    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)
  4. android/guava/src/com/google/common/io/TempFileCreator.java

      /**
       * @throws IllegalStateException if the directory could not be created (to implement the contract
       *     of {@link Files#createTempDir()}, such as if the system does not support creating temporary
       *     directories securely
       */
      abstract File createTempDir();
    
      abstract File createTempFile(String prefix) throws IOException;
    
      private static TempFileCreator pickSecureCreator() {
        try {
    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)
  5. maven-compat/src/test/java/org/apache/maven/artifact/testutils/TestFileManager.java

            }
        }
    
        public void markForDeletion(File toDelete) {
            filesToDelete.add(toDelete);
            warnAboutCleanup = true;
        }
    
        public synchronized File createTempDir() {
            try {
                Thread.sleep(20);
            } catch (InterruptedException e) {
                // ignore
            }
    
            File dir = new File(TEMP_DIR_PATH, baseFilename + System.currentTimeMillis());
    Java
    - Registered: Sun Apr 28 03:35:10 GMT 2024
    - Last Modified: Thu Apr 25 05:46:50 GMT 2024
    - 4.7K bytes
    - Viewed (0)
  6. android/guava-tests/test/com/google/common/io/IoTestCase.java

          }
        }
    
        if (testDir == null) {
          // testdata resources aren't file:// urls, so create a directory to store them in and then
          // copy the resources to the filesystem as needed
          testDir = createTempDir();
        }
    
        return testDir;
      }
    
      /** Returns the file with the given name under the testdata directory. */
      protected final @Nullable File getTestFile(String name) throws IOException {
    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)
  7. android/guava-tests/test/com/google/common/io/FilesFileTraverserTest.java

     *
     * @author Jens Nyman
     */
    
    public class FilesFileTraverserTest extends IoTestCase {
    
      private File rootDir;
    
      @Override
      public void setUp() throws IOException {
        rootDir = createTempDir();
      }
    
      public void testFileTraverser_emptyDirectory() throws Exception {
        assertThat(Files.fileTraverser().breadthFirst(rootDir)).containsExactly(rootDir);
      }
    
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Fri Apr 21 20:17:27 GMT 2023
    - 3.4K bytes
    - Viewed (0)
  8. guava-tests/test/com/google/common/io/FilesFileTraverserTest.java

     *
     * @author Jens Nyman
     */
    
    public class FilesFileTraverserTest extends IoTestCase {
    
      private File rootDir;
    
      @Override
      public void setUp() throws IOException {
        rootDir = createTempDir();
      }
    
      public void testFileTraverser_emptyDirectory() throws Exception {
        assertThat(Files.fileTraverser().breadthFirst(rootDir)).containsExactly(rootDir);
      }
    
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Fri Apr 21 20:17:27 GMT 2023
    - 3.4K bytes
    - Viewed (0)
  9. android/guava-tests/test/com/google/common/reflect/ClassPathTest.java

      private static URL makeJarUrlWithName(String name) throws IOException {
        /*
         * TODO: cpovirk - Use java.nio.file.Files.createTempDirectory instead of
         * c.g.c.io.Files.createTempDir?
         */
        File fullPath = new File(Files.createTempDir(), name);
        File jarFile = pickAnyJarFile();
        Files.copy(jarFile, fullPath);
        return fullPath.toURI().toURL();
      }
    
    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)
  10. guava-tests/test/com/google/common/reflect/ClassPathTest.java

      private static URL makeJarUrlWithName(String name) throws IOException {
        /*
         * TODO: cpovirk - Use java.nio.file.Files.createTempDirectory instead of
         * c.g.c.io.Files.createTempDir?
         */
        File fullPath = new File(Files.createTempDir(), name);
        File jarFile = pickAnyJarFile();
        Files.copy(jarFile, fullPath);
        return fullPath.toURI().toURL();
      }
    
    Java
    - Registered: Fri Apr 12 12:43:09 GMT 2024
    - Last Modified: Mon Jul 10 17:06:37 GMT 2023
    - 27.7K bytes
    - Viewed (0)
Back to top