ZennoLab Assemblies Documentation
FileGetBlocks Method
Example 

Type: System.String

Path to the source file.

Type: System.String

Delimiter for text in the file.

Type: System.String

The line number after splitting into blocks.

Type: System.Boolean

true if remove the used block; otherwise, false.

Type: System.Boolean

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

Gets text blocks from the file
Syntax
public static string[] FileGetBlocks( 
   string path,
   string blockSplitter,
   string numberOfLine,
   bool removeBlock,
   bool removeEmptyFile
)

Parameters

path

Type: System.String

Path to the source file.

blockSplitter

Type: System.String

Delimiter for text in the file.

numberOfLine

Type: System.String

The line number after splitting into blocks.

removeBlock

Type: System.Boolean

true if remove the used block; otherwise, false.

removeEmptyFile

Type: System.Boolean

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

Return Value

Type: System.String

Text blocks after spliting and sampling.

Example
The following example shows call the FileGetBlock method.
string path = {pathToFile};
string blockSplitter = ":";
string numberOfLine = "all";
bool removeBlock = false;
string[] result = FileSystem.FileGetBlocks(path, blockSplitter, numberOfLine, removeBlock);
$path = {pathToFile};
$blockSplitter = ":";
$numberOfLine = "all";
$removeBlock = false;
$result = FileSystem::FileGetBlocks($path, $blockSplitter, $numberOfLine, $removeBlock);
Requirements

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

See Also

Reference

FileSystem Class
FileSystem Members

Send Feedback