https://github.com/JuliaLang/julia
Revision a796a41766c19e3daf004e0a6d7828cf09841d27 authored by Ian Butterworth on 26 February 2024, 19:52:42 UTC, committed by GitHub on 26 February 2024, 19:52:42 UTC
`tempname` checks that the name its returning is not already a file,
however if you want that filename to contain other information, like a
file extension, that can mean the uniquing isn't complete.

This adds `tempname(suffix = "_foo.txt")` to include a suffix in the
name and uniquing check.

---------

Co-authored-by: Jameson Nash <vtjnash@gmail.com>
1 parent 4634c74
History
Tip revision: a796a41766c19e3daf004e0a6d7828cf09841d27 authored by Ian Butterworth on 26 February 2024, 19:52:42 UTC
add suffix kwarg to `tempname` (#53474)
Tip revision: a796a41
File Mode Size
.devcontainer
.github
base
cli
contrib
deps
doc
etc
src
stdlib
test
.buildkite-external-version -rw-r--r-- 5 bytes
.clang-format -rw-r--r-- 3.3 KB
.clangd -rw-r--r-- 114 bytes
.codecov.yml -rw-r--r-- 52 bytes
.git-blame-ignore-revs -rw-r--r-- 371 bytes
.gitattributes -rw-r--r-- 65 bytes
.gitignore -rw-r--r-- 571 bytes
.mailmap -rw-r--r-- 12.7 KB
CITATION.bib -rw-r--r-- 513 bytes
CITATION.cff -rw-r--r-- 940 bytes
CONTRIBUTING.md -rw-r--r-- 23.4 KB
HISTORY.md -rw-r--r-- 388.3 KB
LICENSE.md -rw-r--r-- 1.3 KB
Make.inc -rw-r--r-- 56.1 KB
Makefile -rw-r--r-- 30.2 KB
NEWS.md -rw-r--r-- 1.2 KB
README.md -rw-r--r-- 7.4 KB
THIRDPARTY.md -rw-r--r-- 3.9 KB
VERSION -rw-r--r-- 11 bytes
julia.spdx.json -rw-r--r-- 37.8 KB
pkgimage.mk -rw-r--r-- 7.1 KB
sysimage.mk -rw-r--r-- 4.2 KB
typos.toml -rw-r--r-- 78 bytes

README.md

back to top