C# Class Universe.Framework.Serialization.TarArchiveWriter

Temporary code to produce a tar archive in tar v7 format
Mostra file Open project: Virtual-Universe/Virtual-Universe Class Usage Examples

Protected Properties

Property Type Description
m_asciiEncoding System.Text.ASCIIEncoding
m_bw System.IO.BinaryWriter
m_closed bool
m_utf8Encoding System.Text.UTF8Encoding

Public Methods

Method Description
Close ( ) : void

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

ConvertDecimalToPaddedOctalBytes ( int d, int padding ) : byte[]
TarArchiveWriter ( Stream s ) : System
WriteDir ( string dirName ) : void

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

WriteFile ( string filePath, byte data ) : void

Write a file to the tar archive

WriteFile ( string filePath, string data ) : void

Write a file to the tar archive

Protected Methods

Method Description
WriteEntry ( string filePath, byte data, char fileType ) : void

Write a particular entry

Method Details

Close() public method

Finish writing the raw tar archive data to a stream. The stream will be closed on completion.
public Close ( ) : void
return void

ConvertDecimalToPaddedOctalBytes() public static method

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

TarArchiveWriter() public method

public TarArchiveWriter ( Stream s ) : System
s Stream
return System

WriteDir() public method

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

WriteEntry() protected method

Write a particular entry
protected WriteEntry ( string filePath, byte data, char fileType ) : void
filePath string
data byte
fileType char
return void

WriteFile() public method

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

WriteFile() public method

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

Property Details

m_asciiEncoding protected_oe static_oe property

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

m_bw protected_oe property

Binary writer for the underlying stream
protected BinaryWriter,System.IO m_bw
return System.IO.BinaryWriter

m_closed protected_oe property

protected bool m_closed
return bool

m_utf8Encoding protected_oe static_oe property

protected static UTF8Encoding,System.Text m_utf8Encoding
return System.Text.UTF8Encoding