What is the best way to get a temporary directory with nothing in it using Ruby on Rails? I need the API to be cross-platform compatible. The stdlib tmpdir won't work.
The Dir#tmpdir function in the Ruby core (not stdlib that you linked to) should be cross-platform.
Dir#tmpdir
To use this function you need to require 'tmpdir'.
require 'tmpdir'
2.1m questions
2.1m answers
60 comments
56.8k users