How do I tell ruby to create files with the attributes FILE_ATTRIBUTE_TEMPORARY
and FILE_FLAG_DELETE_ON_CLOSE
?
views:
89answers:
3
A:
I grepped Ruby 1.8.7 source and did not find any mention of those attributes, so I'm thinking that you get to fix it and build from source...
DigitalRoss
2009-11-30 08:12:32
A:
Probably because of it's Unix roots, Ruby doesn't (yet) allow that. You can probably obtain the result you want with:
require 'tempfile'
Tempfile.new "my_temp_file" do |f|
#...
end
Marc-André Lafortune
2009-11-30 16:18:13