Sha256: 3c01168446b784c7ef8540bae9493de2a16481b9288be1324dc40be8872b12de

Contents?: true

Size: 463 Bytes

Versions: 4

Compression:

Stored size: 463 Bytes

Contents

require 'em-fs/file/stat'

module EventMachine
  class File

    class << self

      def stat path, &block
        EM::SystemCommand.execute 'stat', [:format, EM::File::Stat::STAT_FORMAT], path do |on|
          on.success do |ps|
            block.call EM::File::Stat.parse ps.stdout.output
          end
          on.failure do |ps|
            raise "EM::File::stat failed. Output:\n#{ps.stderr.output}"
          end
        end
      end

    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
em-fs-0.1.2 lib/em-fs/file.rb
em-fs-0.1.1 lib/em-fs/file.rb
em-fs-0.1.0 lib/em-fs/file.rb
em-fs-0.0.1 lib/em-fs/file.rb