Skip to content

io.util #

fn temp_dir #

fn temp_dir(tdo TempFileOptions) !string

temp_dir returns a uniquely named, writable, directory path.

fn temp_file #

fn temp_file(tfo TempFileOptions) !(os.File, string)

temp_file returns a uniquely named, open, writable, os.File and it's path.

struct TempDirOptions #

@[params]
struct TempDirOptions {
pub:
	path    string = os.temp_dir()
	pattern string
}

struct TempFileOptions #

@[params]
struct TempFileOptions {
pub:
	path    string = os.temp_dir()
	pattern string
}