C# Class SimExport.TarArchiveWriter

Produces a tar archive in tar v7 format
ファイルを表示 Open project: 3di/3di-viewer-rei-libs Class Usage Examples

Protected Properties

Property Type Description
m_asciiEncoding System.Text.ASCIIEncoding
m_files byte[]>.Dictionary

Public Methods

Method Description
AddDir ( string dirName ) : void

Add a directory to the tar archive. We can only handle one path level right now!

AddFile ( string filePath, byte data ) : void

Add a file to the tar archive

AddFile ( string filePath, string data ) : void

Add a file to the tar archive

ConvertDecimalToPaddedOctalBytes ( int d, int padding ) : byte[]
WriteTar ( Stream s ) : void

Write the raw tar archive data to a stream. The stream will be closed on completion.

Method Details

AddDir() public method

Add a directory to the tar archive. We can only handle one path level right now!
public AddDir ( string dirName ) : void
dirName string
return void

AddFile() public method

Add a file to the tar archive
public AddFile ( string filePath, byte data ) : void
filePath string
data byte
return void

AddFile() public method

Add a file to the tar archive
public AddFile ( string filePath, string data ) : void
filePath string
data string
return void

ConvertDecimalToPaddedOctalBytes() public static method

public static ConvertDecimalToPaddedOctalBytes ( int d, int padding ) : byte[]
d int
padding int
return byte[]

WriteTar() public method

Write the raw tar archive data to a stream. The stream will be closed on completion.
public WriteTar ( Stream s ) : void
s Stream Stream to which to write the data
return void

Property Details

m_asciiEncoding protected_oe static_oe property

protected static ASCIIEncoding,System.Text m_asciiEncoding
return System.Text.ASCIIEncoding

m_files protected_oe property

protected Dictionary m_files
return byte[]>.Dictionary