Skip to content

Library to split a large file into small ones, and join them again into the original large file

License

Notifications You must be signed in to change notification settings

J0rgeSerran0/FileCutter

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

FileCutter

Library to split a large file into small ones, and join them again to the original large file

This library is based in other code [FileUtilities] that I wrote some years ago. The motivation to do this, is to resolve an issue found in the original code and do the library simpler

Diagram

screenshot

How to

Note: The original files in the split or join actions, are deleted by default. If you don't want to delete the original file or the cutter files, you should indicate this in the parameters of the Splitter and Joiner methods.

Split Files

Using the Splitter method

Splitter(string inputFile, int chunkFiles, SizeType sizeType = SizeType.None, bool deleteOriginFile = true)
  • This code show you how to split a large file into files of 4 Megabytes:
var fileCutterProcess = new FileCutter.Process();
fileCutterProcess.Splitter(@"C:\Temp\BigFile.txt", 4, SizeType.MBytes);
  • This code show you how to split a large file into 5 files:
var fileCutterProcess = new FileCutter.Process();
fileCutterProcess.Splitter(@"C:\Temp\BigFile.txt", 5);

Join Files

Using the Joiner method

Joiner(string outputPath, bool deleteCutterFiles = true)
  • This code show you how to join the splitted files, to the original file:
var fileCutterProcess = new FileCutter.Process();
fileCutterProcess.Joiner(@"C:\Temp");

Note: the join action look for files with the .cut extension.

About

Library to split a large file into small ones, and join them again into the original large file

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages