C# Class TailBlazer.Domain.FileHandling.FileInfoEx

Datei anzeigen Open project: RolandPheasant/TailBlazer

Public Methods

Method Description
FindDelimiter ( this source ) : int

Finds the delimiter by looking for the first line in the file and comparing chars

FindNextEndOfLinePosition ( this source, long initialPosition, SeekOrigin origin = SeekOrigin.Begin ) : long
GetEncoding ( this source ) : Encoding

Determines the encoding of a file

GetFileLength ( this source ) : long
ReadLinesByPosition ( this source, long positions, bool>.Func isEndOfTail = null ) : IEnumerable
WatchFile ( this file, IObservable pulse ) : IObservable
WatchFile ( this file, System.TimeSpan refreshPeriod = null, IScheduler scheduler = null ) : IObservable

A simpler alternative to the irritatingly useless FileSystemWatcher

Method Details

FindDelimiter() public static method

Finds the delimiter by looking for the first line in the file and comparing chars
public static FindDelimiter ( this source ) : int
source this The source.
return int

FindNextEndOfLinePosition() public static method

public static FindNextEndOfLinePosition ( this source, long initialPosition, SeekOrigin origin = SeekOrigin.Begin ) : long
source this
initialPosition long
origin SeekOrigin
return long

GetEncoding() public static method

Determines the encoding of a file
public static GetEncoding ( this source ) : Encoding
source this
return System.Text.Encoding

GetFileLength() public static method

public static GetFileLength ( this source ) : long
source this
return long

ReadLinesByPosition() public static method

public static ReadLinesByPosition ( this source, long positions, bool>.Func isEndOfTail = null ) : IEnumerable
source this
positions long
isEndOfTail bool>.Func
return IEnumerable

WatchFile() public static method

public static WatchFile ( this file, IObservable pulse ) : IObservable
file this
pulse IObservable
return IObservable

WatchFile() public static method

A simpler alternative to the irritatingly useless FileSystemWatcher
public static WatchFile ( this file, System.TimeSpan refreshPeriod = null, IScheduler scheduler = null ) : IObservable
file this The file to monitor
refreshPeriod System.TimeSpan The refresh period.
scheduler IScheduler The scheduler.
return IObservable