Module: Fluent::FileWrapper

Defined in:
lib/fluent/plugin/file_wrapper.rb

Class Method Summary collapse

Class Method Details

.open(*args) ⇒ Object



19
20
21
22
23
24
25
26
27
28
# File 'lib/fluent/plugin/file_wrapper.rb', line 19

def self.open(*args)
  io = WindowsFile.new(*args).io
  if block_given?
    v = yield io
    io.close
    v
  else
    io
  end
end

.stat(path) ⇒ Object



30
31
32
33
34
35
# File 'lib/fluent/plugin/file_wrapper.rb', line 30

def self.stat(path)
  f = WindowsFile.new(path)
  s = f.stat
  f.close
  s
end