|
From: | Rolando Sacramento |
Subject: | Re: [Bug-tar] Split Big File Using "tar" |
Date: | Mon, 30 Jan 2006 15:36:49 +0800 |
hi,
Is this 80G file is only 1 file?
if not you can specify a specific limit to create a
Tar File.
e.g.
ulong TotalFileSize = 0;
int Limit = 1000; //KB
foreach(Fileinfo oFile in
Directory.GetFiles()){
TotalFileSize +=
oFile.Length;
if (TotalFileSize <
Limit){
TarEntry
oTarEntry = TarEntry.CreateEntryFromFile(oFile.FullName);
archive.WriteEntry(oTar, true);
}
else{
archive.Close();
}
}
then loop again.
if this is 80G file is only
You do a similar process above but instead of
reading and adding per file, you must open a stream and read from the streams.
after a condition that satisfy the limit of your per archive close it. and
create a new archive using the same stream.
Rolly
address@hidden
|
[Prev in Thread] | Current Thread | [Next in Thread] |