FileSplitterSplit(Int64, String, String, Boolean, Boolean) Method

Splits a file into chunks of the specified filesize.

Definition

Namespace: DevCase.Core.IO.FileSystem
Assembly: DevCase.net48 (in DevCase.net48.dll) Version: 6.0.0.0 (6.0)
XMLNS for XAML: Not mapped to an xmlns.
public virtual void Split(
	long chunkSize,
	string chunkName = "",
	string chunkExt = "",
	bool overwrite = false,
	bool deleteAfterSplit = false
)

Parameters

chunkSize  Int64
The size per chunk, in bytes.
chunkName  String  (Optional)
The name-format for the generated chunks.
chunkExt  String  (Optional)
The file-extension of the generated chunks.
overwrite  Boolean  (Optional)
If set to , any existing file will be overwritten if needed to create a chunk, otherwise, an exception will be thrown.
deleteAfterSplit  Boolean  (Optional)
If set to , the source file will be deleted after a successful split operation.

Exceptions

FileNotFoundException The specified source file doesn't exists.
IOException File already exists.
OverflowException 'chunkSize' value should be smaller than the source filesize.

See Also