systmpdir()
Returns system temporary directory.
static VALUE etc_systmpdir(void) { #ifdef _WIN32 WCHAR path[_MAX_PATH]; UINT len = rb_w32_system_tmpdir(path, numberof(path)); if (!len) return Qnil; return rb_w32_conv_from_wchar(path, rb_filesystem_encoding()); #else return rb_filesystem_str_new_cstr("/tmp"); #endif }