使用TempfileRuby时,正在创建一个具有线程安全和进程间安全名称的文件.我只需要这样的文件名.
Tempfile
我想知道是否有比以往更直接的方法:
t = Tempfile.new(['fleischwurst', '.png']) temp_path = t.path t.close t.unlink
ruby filenames thread-safety temp
filenames ×1
ruby ×1
temp ×1
thread-safety ×1