123456789_123456789_123456789_123456789_123456789_

Module: FileUtils::StreamUtils_

Do not use. This module is for internal use only.
Relationships & Source Files
Extension / Inclusion / Inheritance Descendants
Extended In:
Included In:
Defined in: lib/fileutils.rb

Instance Method Summary

Instance Method Details

#fu_blksize(st) (private)

[ GitHub ]

  
# File 'lib/fileutils.rb', line 2056

def fu_blksize(st) #:nodoc:
  s = st.blksize
  return nil unless s
  return nil if s == 0
  s
end

#fu_copy_stream0(src, dest, blksize = nil) (private)

[ GitHub ]

  
# File 'lib/fileutils.rb', line 2043

def fu_copy_stream0(src, dest, blksize = nil)   #:nodoc:
  IO.copy_stream(src, dest)
end

#fu_default_blksize (private)

[ GitHub ]

  
# File 'lib/fileutils.rb', line 2063

def fu_default_blksize #:nodoc:
  1024
end

#fu_stream_blksize(*streams) (private)

[ GitHub ]

  
# File 'lib/fileutils.rb', line 2047

def fu_stream_blksize(*streams) #:nodoc:
  streams.each do |s|
    next unless s.respond_to?(:stat)
    size = fu_blksize(s.stat)
    return size if size
  end
  fu_default_blksize()
end