class Vagrant::Util::Tempfile
Public Class Methods
mktmpdir(prefix_suffix)
click to toggle source
# File lib/vagrant/util/tempfile.rb, line 28 def self.mktmpdir(prefix_suffix) Dir.mktmpdir(prefix_suffix, private_tmpdir) end
new(basename)
click to toggle source
Calls superclass method
# File lib/vagrant/util/tempfile.rb, line 8 def initialize(basename) super(basename, private_tmpdir) end
private_tmpdir()
click to toggle source
# File lib/vagrant/util/tempfile.rb, line 16 def self.private_tmpdir @private_tmpdir ||= begin user = Etc.getpwuid.name pid = Process.pid tmpdir = File.join(Dir.tmpdir, "vagrant-#{user}-#{pid}") FileUtils.mkdir_p(tmpdir) FileUtils.chmod(0700, tmpdir) tmpdir end end
Public Instance Methods
private_tmpdir()
click to toggle source
# File lib/vagrant/util/tempfile.rb, line 12 def private_tmpdir self.class.private_tmpdir end