ZennoLab Assemblies Documentation
FileGetLines(String,String,Boolean,String,String,Boolean) Method
Example 
ZennoLab.Macros Namespace > FileSystem Class > FileGetLines Method : FileGetLines(String,String,Boolean,String,String,Boolean) Method

Type: System.String

Path to the source file.

Type: System.String

The number of the line.

Type: System.Boolean

true if remove the used line; otherwise, false.

Type: System.String

Regular expression to parse the line.

Type: System.String

Number of match after parsing.

Type: System.Boolean

true if need to remove empty source file after sampling; otherwise, false.

Gets strings from the file
Syntax

Parameters

path

Type: System.String

Path to the source file.

numberOfLine

Type: System.String

The number of the line.

removeLine

Type: System.Boolean

true if remove the used line; otherwise, false.

regex

Type: System.String

Regular expression to parse the line.

numberOfMatch

Type: System.String

Number of match after parsing.

removeEmptyFile

Type: System.Boolean

true if need to remove empty source file after sampling; otherwise, false.

Return Value

Type: System.String

Strings after spliting and sampling.

Example
The following example shows call the FileGetLine method.
string path = {pathToFile};
string numberOfLine = {numberOfLine};
bool removeLine = true;
string regex = {regularExpression};
string numberOfMatch = {numberOfMatch};
string[] result = FileSystem.FileGetLines(path, numberOfLine, removeLine, regex, numberOfMatch);
$path = {pathToFile};
$numberOfLine = {numberOfLine};
$removeLine = true;
$regex = {regularExpression};
$numberOfMatch = {numberOfMatch};
$result = FileSystem::FileGetLines($path, $numberOfLine, $removeLine, $regex, $numberOfMatch);
Requirements

Target Platforms: Desktop: Windows XP SP3 and older. Server: Windows Server 2003 and older.

See Also

Reference

FileSystem Class
FileSystem Members
Overload List