module Fluent::FileWrapper

Public Class Methods

open(path, mode='r') { |io| ... } click to toggle source
# File lib/fluent/file_wrapper.rb, line 24
def self.open(path, mode='r')
  io = WindowsFile.new(path, mode).io
  if block_given?
    v = yield io
    io.close
    v
  else
    io
  end
end
stat(path) click to toggle source
# File lib/fluent/file_wrapper.rb, line 35
def self.stat(path)
  f = WindowsFile.new(path)
  s = f.stat
  f.close
  s
end