Skip to content

suzumura-ss/file_tee

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

== README ==

=== How to use ===
require 'file_tee'

# sampe 1
http = Net::HTTP.start("host", port)
File.open("path_to_write", "w") {|wf|
  File.open("path_to_read") {|rf|
    FileTee.open(rf, wf) {|tee|
      req = Net::HTTP::Post.new("url_to_upload")
      req.body_stream = tee
      http.request(req) # In background, write to "path_to_write".
    }
  }
}

# sample 2
http = Net::HTTP.start("host", port)
FileTee.open("path_to_read", "path_to_write") {|tee|
  req = Net::HTTP::Post.new("url_to_upload")
  req.body_stream = tee
  http.request(req) # In background, write to "path_to_write".
}

About

File access utility like as 'tee'.

Resources

License

Unknown, LGPL-3.0 licenses found

Licenses found

Unknown
LICENSE
LGPL-3.0
COPYING.LESSER

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages