在临时目录创建临时文件，命名为${prefix}${random.nextLong()}${suffix}

@see {@link Files#createTempFile}
763209
public static Path createTempFile(String prefix, String suffix) throws IOException {
		return Files.createTempFile(prefix, suffix);
	}
897688
public static File writeToTempFile(ByteBuffer byteBuffer, String prefix, String suffix) throws IOException {
        File tmpOutputFile = null;

        try (RandomAccessFile outputRaf = new RandomAccessFile(tmpOutputFile, "rw")) {
            // Create temporary file
            tmpOutputFile = File.createTempFile(prefix, "." + suffix);
            FileChannel outputChannel = outputRaf.getChannel();

            outputChannel.write(byteBuffer);

        } catch (IOException ioe) {
            String info = "Failed to write to temporary file: " + ioe.getMessage();
            throw new IOException(info, ioe);
        }
        return tmpOutputFile;
    }
1011235
private function randomFileName()
        {
            if ($this->randomNameType == 1)        // 生成时间格式文件名
            {
                date_default_timezone_set('PRC');  //设置时区
                
                $date     = date($this->randomLength);
                $fileName = $date . "_" . mt_rand(10000, 99999);
            }
            elseif ($this->randomNameType == 2)    // 生成随机字符文件名
            {
                $chars = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789abcdefghijklmnopqrstuvwxyz';
                $max   = strlen($chars) - 1;
                mt_srand((double)microtime() * 1000000);
                
                for($i = 0; $i < $this->randomLength; $i++)
                {
                    $fileName .= $chars[mt_rand(0, $max)];
                }
            }
            else
            {
                $fileName = '';
            }

            return $fileName;
        }
1140091
public static File createTempFile(File dir, boolean isReCreat) throws IORuntimeException {
		return createTempFile("hutool", null, dir, isReCreat);
	}
56568
public static File createTempDirectory(String prefix, Path dir) throws IOException {
        if (prefix == null) {
            prefix = "";
        }
        final File file = generatePath(prefix, dir).toFile();
        if (!file.mkdirs()) {
            throw new IOException("Can't create dir " + file.getAbsolutePath());
        }
        return file;
    }
1357011
public static String getRandomFilename(final String prefix) {

		final StringBuilder stringBuilder = new StringBuilder(prefix);

		for (int i = 0; i < LENGTH; i++) {
			stringBuilder.append(ALPHABET[(int) Math.floor(Math.random() * (double) ALPHABET.length)]);
		}

		return stringBuilder.toString();
	}
1162427
def make_tmp_dir(suffix="", prefix="tmp", dir=None):  # pylint: disable=redefined-builtin
  """"""
  if dir is None:
    return tempfile.mkdtemp(suffix, prefix, dir)
  else:
    while True:
      rand_term = random.randint(1, 9999)
      tmp_dir = os.path.join(dir, "%s%d%s" % (prefix, rand_term, suffix))
      if tf.gfile.Exists(tmp_dir):
        continue
      tf.gfile.MakeDirs(tmp_dir)
      break
    return tmp_dir
688894
public StreamOut createFile(String strFullFileName)
    {
        StreamOut streamOut = null;
        try   {
            File file = new File(strFullFileName);
            String pathName = file.getParent();
            File fileDir = new File(pathName);
            fileDir.mkdirs();
            streamOut = new StreamOut(strFullFileName);
        } catch (IOException ex)    {
            ex.printStackTrace();
            streamOut = null;
        }
        return streamOut;
    }
553755
def create_temp_file_name(suffix, prefix=None, dir=None, directory=None):
    
    if dir is not None:
        warnings.warn(
            "The dir argument is deprecated.\n" +
            "Please use the directory argument instead.", DeprecationWarning)
        # Deprecated since 1.9.0, will be removed in 2.0.0
        directory = dir

    if not prefix:
        prefix = tempfile.gettempprefix()
    fd, name = tempfile.mkstemp(suffix=suffix, prefix=prefix, dir=directory)
    file_obj = os.fdopen(fd)
    file_obj.close()
    return name
655060
private FileWriter createTempFile(File tempfile) throws IOException,
            JournalException {
        boolean created = tempfile.createNewFile();
        if (!created) {
            throw new JournalException("Unable to create file '"
                    + tempfile.getPath() + "'.");
        }
        return new FileWriter(tempfile);
    }
515924
public static File writeToTempFile(String buf, String prefix, String suffix) throws IOException {

        InputStream is = new ByteArrayInputStream(buf.getBytes("UTF-8"));
        return writeToTempFile(is, prefix, suffix);
    }
391908
public TempFileNameScheme getTempFileNameScheme() {
        final TempFileNameScheme tempFileNameScheme;
        try {
            final String cls = Optional
                    .ofNullable(getProperty("temp-file-name-scheme"))
                    .orElse(configuration.get("temp-file-name-scheme"));
            tempFileNameScheme = (GenMapAndTopicListModule.TempFileNameScheme) Class.forName(cls).newInstance();
        } catch (InstantiationException | IllegalAccessException | ClassNotFoundException e) {
            throw new RuntimeException(e);
        }
        tempFileNameScheme.setBaseDir(getInputDir());
        return tempFileNameScheme;
    }
610251
@SuppressWarnings("static-method")
	protected File createTempDirectory() {
		final File tmpPath = new File(System.getProperty("java.io.tmpdir")); //$NON-NLS-1$
		int i = 0;
		File tmp = new File(tmpPath, "sarlc" + i); //$NON-NLS-1$
		while (tmp.exists()) {
			++i;
			tmp = new File(tmpPath, "sarlc" + i); //$NON-NLS-1$
		}
		return tmp;
	}
1373207
public File createTempDir(String prefix, String suffix) {
    try {
      // Create a tempfile, and delete it.
      File file = File.createTempFile(prefix, suffix, baseDir);
      file.delete();

      // Create it as a directory.
      File dir = new File(file.getAbsolutePath());
      if (!dir.mkdirs()) {
        throw new WebDriverException("Cannot create profile directory at " + dir.getAbsolutePath());
      }

      // Create the directory and mark it writable.
      FileHandler.createDir(dir);

      temporaryFiles.add(dir);
      return dir;
    } catch (IOException e) {
      throw new WebDriverException(
          "Unable to create temporary file at " + baseDir.getAbsolutePath());
    }
  }
1129494
protected Path createTempDirectory(String prefix) {
        try {
            return Files.createTempDirectory(tempDirectory, prefix);
        } catch (IOException e) {
            throw new AllureCommandException(e);
        }
    }
858530
public static FileChannel createTempFile(String prefix, String suffix) throws IOException {
        return createTempFile(TMPDIR, prefix, suffix);
    }
517208
public File getTempFile(@NotNull final String prefix, @NotNull final String extension) throws IOException {
        final File dir = getTempDirectory();
        final String tempFileName = String.format("%s%s.%s", prefix, UUID.randomUUID().toString(), extension);
        final File tempFile = new File(dir, tempFileName);
        if (tempFile.exists()) {
            return getTempFile(prefix, extension);
        }
        return tempFile;
    }