public static long GetSizeInBytes(long val, chunkSizeType sizeType) { string str="bytes"; switch(sizeType) { case chunkSizeType.kb: str="kb"; break; case chunkSizeType.mb: str="mb"; break; case chunkSizeType.gb: str="gb"; break; } return GetSizeInBytes(val, str); }
public static void SplitFile(string inputFile, string outputDir, long chunkSize, chunkSizeType chunkSizeTyp, KsSplitJoinHandler handler) { FileInfo fi=new FileInfo(inputFile); SplitFile(inputFile, outputDir, fi.Name, GetSizeInBytes(chunkSize, chunkSizeTyp), handler); }
public static void SplitFile(string inputFile, string outputDir, string outputPrefix, long chunkSize, chunkSizeType chunkSizeTyp, KsSplitJoinHandler handler) { SplitFile(inputFile, outputDir, outputPrefix, GetSizeInBytes(chunkSize, chunkSizeTyp), handler); }