Class | TMail::FilePort |
In: |
lib/tmail/port.rb
|
Parent: | Port |
path | -> | filename |
path | -> | ident |
path | [R] |
# File lib/tmail/port.rb, line 38 def ==(other) other.respond_to?(:path) and @path == other.path end
# File lib/tmail/port.rb, line 96 def copy_to(port) if port.is_a?(FilePort) copy_file @path, port.path else File.open(@path) {|r| port.wopen {|w| while s = r.sysread(4096) w.write << s end } } end end
# File lib/tmail/port.rb, line 85 def move_to(port) begin File.link @path, port.path rescue Errno::EXDEV copy_to port end File.unlink @path end