C# Class Microsoft.Scripting.Utils.IOUtils

Show file Open project: jschementi/iron

Public Methods

Method Description
ReadTo ( TextReader reader, char terminator ) : string

Reads characters to a string until end position or a terminator is reached. Doesn't include the terminator into the resulting string. Returns null, if the reader is at the end position.

SeekLine ( TextReader reader, int line ) : bool

Seeks the first character of a specified line in the text stream.

SeekTo ( TextReader reader, char c ) : bool

Reads characters until end position or a terminator is reached. Returns true if the character has been found (the reader is positioned right behind the character), false otherwise.

ToValidFileName ( string path ) : string
ToValidPath ( string path ) : string
ToValidPath ( string path, bool isMask ) : string

Private Methods

Method Description
ToValidPath ( string path, bool isMask, bool isPath ) : string

Method Details

ReadTo() public static method

Reads characters to a string until end position or a terminator is reached. Doesn't include the terminator into the resulting string. Returns null, if the reader is at the end position.
public static ReadTo ( TextReader reader, char terminator ) : string
reader TextReader
terminator char
return string

SeekLine() public static method

Seeks the first character of a specified line in the text stream.
public static SeekLine ( TextReader reader, int line ) : bool
reader TextReader The reader.
line int Line number. The current position is assumed to be line #1.
return bool

SeekTo() public static method

Reads characters until end position or a terminator is reached. Returns true if the character has been found (the reader is positioned right behind the character), false otherwise.
public static SeekTo ( TextReader reader, char c ) : bool
reader TextReader
c char
return bool

ToValidFileName() public static method

public static ToValidFileName ( string path ) : string
path string
return string

ToValidPath() public static method

public static ToValidPath ( string path ) : string
path string
return string

ToValidPath() public static method

public static ToValidPath ( string path, bool isMask ) : string
path string
isMask bool
return string