Unix使用/来分隔文件夹,但Windows使用\,所以我想知道跨平台连接两个路径的安全方法,如/tmp/ + temp_file.xxx。
/
\
/tmp/
temp_file.xxx
一分钟后,我找到了答案,File.join(-_-)
File.join