1
0
mirror of https://github.com/vlang/v.git synced 2023-08-10 21:13:21 +03:00

os: tmpdir => temp_dir

This commit is contained in:
yuyi
2020-03-10 22:02:09 +08:00
committed by GitHub
parent 7e1870be3e
commit 57b1b12ab6
9 changed files with 13 additions and 13 deletions

View File

@@ -1106,7 +1106,7 @@ pub fn cache_dir() string {
}
// tmpdir returns the path to a folder, that is suitable for storing temporary files
pub fn tmpdir() string {
pub fn temp_dir() string {
mut path := os.getenv('TMPDIR')
$if windows {
if path == '' {

View File

@@ -164,7 +164,7 @@ fn test_cp_r() {
}
fn test_tmpdir(){
t := os.tmpdir()
t := os.temp_dir()
assert t.len > 0
assert os.is_dir(t)
@@ -247,7 +247,7 @@ fn test_symlink() {
}
fn test_is_executable_writable_readable() {
file_name := os.tmpdir() + os.path_separator + 'rwxfile.exe'
file_name := os.temp_dir() + os.path_separator + 'rwxfile.exe'
mut f := os.create(file_name) or {
eprintln('failed to create file $file_name')