struct Tail::File

Defined in:

tail.cr

Constructors

Instance Method Summary

Constructor Detail

def self.new(file : ::File) #

[View source]
def self.new(file : String) #

[View source]

Instance Method Detail

def file : ::File #

[View source]
def follow(lines = 0, line_size = 1024, delay = 0.1, &block : String -> _) #

Follow the end of a file


[View source]
def last_lines(lines = 10, line_size = 1024) : Array(String) #

Get the last n lines. line_size is used to extract the end of the file, and then calculate the trailing lines


[View source]
def watch(lines = 0, line_size = 1024, &block : String -> _) #

Use Inotify to yield newly added bytes from the file


[View source]