instance method
copy_file
Ruby on Rails 2.3.18
Since v2.2.3 Last seen in v2.3.18 PrivateAvailable in: v2.2.3 v2.3.18
Signature
copy_file( src, dest )
from fileutils.rb
Parameters
-
srcreq -
destreq
Source
# File actionmailer/lib/action_mailer/vendor/tmail-1.2.7/tmail/port.rb, line 135
def copy_file( src, dest )
st = r = w = nil
File.open(src, 'rb') {|r|
File.open(dest, 'wb') {|w|
st = r.stat
begin
while true
w.write r.sysread(st.blksize)
end
rescue EOFError
end
} }
end
Defined in actionmailer/lib/action_mailer/vendor/tmail-1.2.7/tmail/port.rb line 135
· View on GitHub
· Improve this page
· Find usages on GitHub
Defined in TMail::FilePort