class Linguist::FileBlob

‘data`, `path` and `size`.
like a Grit::Blob. It provides the basic interface: `name`,
A FileBlob is a wrapper around a File object to make it quack

def data

Returns a String.

Public: Read file contents.
def data
  @data ||= File.read(@fullpath, :encoding => "ASCII-8BIT")
end

def initialize(path, base_path = nil)

Returns a FileBlob.

base_path - Optional base to relativize the path
path - A path String that exists on the file system.

Public: Initialize a new FileBlob from a path
def initialize(path, base_path = nil)
  @fullpath = path
  @path = base_path ? path.sub("#{base_path}/", '') : path
end

def mode

Returns a String like '100644'

Public: Read file permissions
def mode
  @mode ||= File.stat(@fullpath).mode.to_s(8)
end

def size

Returns an Integer.

Public: Get byte size
def size
  @size ||= File.size(@fullpath)
end

def symlink?

def symlink?
  return @symlink if defined? @symlink
  @symlink = (File.symlink?(@fullpath) rescue false)
end