123456789_123456789_123456789_123456789_123456789_

Module: FileUtils::StreamUtils_

Relationships & Source Files
Extension / Inclusion / Inheritance Descendants
Extended In:
Included In:
::FileUtils, DryRun, FileUtils::Entry_, NoWrite, Verbose
Defined in: lib/fileutils.rb

Instance Attribute Summary

Instance Method Summary

Instance Attribute Details

#fu_windows?Boolean (readonly, private)

[ GitHub ]

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

def fu_windows?
  /mswin|mingw|bccwin|emx/ =~ RUBY_PLATFORM
end

Instance Method Details

#fu_blksize(st) (private)

[ GitHub ]

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

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

#fu_default_blksize (private)

[ GitHub ]

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

def fu_default_blksize
  1024
end

#fu_stream_blksize(*streams) (private)

[ GitHub ]

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

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