C# Class Microsoft.Scripting.Utils.IOUtils

Afficher le fichier Open project: jschementi/iron

Méthodes publiques

Méthode 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

Méthode Description
ToValidPath ( string path, bool isMask, bool isPath ) : string

Method Details

ReadTo() public static méthode

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
Résultat string

SeekLine() public static méthode

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.
Résultat bool

SeekTo() public static méthode

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
Résultat bool

ToValidFileName() public static méthode

public static ToValidFileName ( string path ) : string
path string
Résultat string

ToValidPath() public static méthode

public static ToValidPath ( string path ) : string
path string
Résultat string

ToValidPath() public static méthode

public static ToValidPath ( string path, bool isMask ) : string
path string
isMask bool
Résultat string