Method: BugFix::Tempfile#unlink

Defined in:
lib/pik/contrib/zip/tempfile_bugfixed.rb

Unlinks the file. On UNIX-like systems, it is often a good idea to unlink a temporary file immediately after creating and opening it, because it leaves other programs zero chance to access the file.



109
110
111
112
113
# File 'lib/pik/contrib/zip/tempfile_bugfixed.rb', line 109

def unlink
  # keep this order for thread safeness
  File.unlink(@tmpname) if File.exist?(@tmpname)
  @@cleanlist.delete(@tmpname) if @@cleanlist
end