Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 12 for createTempDir (0.22 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 May 03 12:43:13 GMT 2024
    - Last Modified: Fri Oct 06 17:11:11 GMT 2023
    - 4.3K bytes
    - Viewed (0)
  3. 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)
  4. 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 May 03 12:43:13 GMT 2024
    - Last Modified: Wed Apr 19 19:24:36 GMT 2023
    - 5.6K bytes
    - Viewed (0)
  5. 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)
  6. 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)
  7. 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 May 03 12:43:13 GMT 2024
    - Last Modified: Fri Apr 26 14:02:27 GMT 2024
    - 24.9K bytes
    - Viewed (0)
  8. 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)
  9. android/guava-tests/test/com/google/common/io/FilesTest.java

    /**
     * Unit test for {@link Files}.
     *
     * <p>Some methods are tested in separate files:
     *
     * <ul>
     *   <li>{@link Files#fileTraverser()} is tested in {@link FilesFileTraverserTest}.
     *   <li>{@link Files#createTempDir()} is tested in {@link FilesCreateTempDirTest}.
     * </ul>
     *
     * @author Chris Nokleberg
     */
    
    public class FilesTest extends IoTestCase {
    
      @AndroidIncompatible // suites, ByteSourceTester (b/230620681)
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Wed Sep 06 17:04:31 GMT 2023
    - 22.2K bytes
    - Viewed (0)
  10. 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 May 03 12:43:13 GMT 2024
    - Last Modified: Fri Apr 21 20:17:27 GMT 2023
    - 3.4K bytes
    - Viewed (0)
Back to top