Sha256: 95b2a8a1c40988b33fcce65a4268f59677aebf952800750f57e0ec587bc0e6d4
Contents?: true
Size: 303 Bytes
Versions: 12
Compression:
Stored size: 303 Bytes
Contents
module Excavate class FileMagic def self.detect(path) new(path).detect end def initialize(path) @path = path end def detect case File.read(@path, 8, mode: "rb") when "MSCF\x00\x00\x00\x00".force_encoding("BINARY") :cab end end end end
Version data entries
12 entries across 12 versions & 1 rubygems