Commits

winebarrel  committed 3f3579d

r2679@LENOVO-6D4C2336: sugawara | 2008-09-16 14:25:30 +0900

  • Participants
  • Parent commits e815357

Comments (0)

Files changed (1)

 
     require 'tarruby'
     
+    buf = 'ABCDEFG'
+    
     Tar.open('bar.tar', File::CREAT | File::WRONLY, 0644, Tar::GNU | Tar::VERBOSE) do |tar|
       Dir.glob('**/*.c').each do |filename|
         tar.append_file(filename)
       end
       
+      # append from buffer
+      tar.append_buffer('zoo.txt, buf)
+      
       ##if append directory
       #tar.append_tree('dirname')
     end