os api: cachedir => cache_dir
							parent
							
								
									83b6292105
								
							
						
					
					
						commit
						a569959fb8
					
				|  | @ -36,7 +36,7 @@ fn test_all_v_repl_files() { | |||
| 		bmark: benchmark.new_benchmark() | ||||
| 	} | ||||
| 	// warmup, and ensure that the vrepl is compiled in single threaded mode if it does not exist
 | ||||
| 	runner.run_repl_file(os.cachedir(), session.options.vexec, 'vlib/compiler/tests/repl/nothing.repl') or { | ||||
| 	runner.run_repl_file(os.cache_dir(), session.options.vexec, 'vlib/compiler/tests/repl/nothing.repl') or { | ||||
| 		panic(err) | ||||
| 	} | ||||
| 	session.bmark.set_total_expected_steps(session.options.files.len) | ||||
|  | @ -54,7 +54,7 @@ fn test_all_v_repl_files() { | |||
| } | ||||
| 
 | ||||
| fn worker_repl(p mut sync.PoolProcessor, idx int, thread_id int) voidptr { | ||||
| 	cdir := os.cachedir() | ||||
| 	cdir := os.cache_dir() | ||||
| 	mut session := &Session(p.get_shared_context()) | ||||
| 	mut tls_bench := &benchmark.Benchmark(p.get_thread_context(idx)) | ||||
| 	if isnil(tls_bench) { | ||||
|  |  | |||
|  | @ -1123,8 +1123,8 @@ pub fn mkdir_all(path string) { | |||
| 	} | ||||
| } | ||||
| 
 | ||||
| // cachedir returns the path to a *writable* user specific folder, suitable for writing non-essential data.
 | ||||
| pub fn cachedir() string { | ||||
| // cache_dir returns the path to a *writable* user specific folder, suitable for writing non-essential data.
 | ||||
| pub fn cache_dir() string { | ||||
| 	// See: https://specifications.freedesktop.org/basedir-spec/basedir-spec-latest.html
 | ||||
| 	// There is a single base directory relative to which user-specific non-essential
 | ||||
| 	// (cached) data should be written. This directory is defined by the environment
 | ||||
|  | @ -1165,7 +1165,7 @@ pub fn tmpdir() string { | |||
| 		} | ||||
| 	} | ||||
| 	if path == '' { | ||||
| 		path = os.cachedir() | ||||
| 		path = os.cache_dir() | ||||
| 	} | ||||
| 	if path == '' { | ||||
| 		path = '/tmp' | ||||
|  |  | |||
		Loading…
	
		Reference in New Issue