本文整理汇总了C#中ICSharpCode.SharpZipLib.Tar.TarEntry.Initialize方法的典型用法代码示例。如果您正苦于以下问题:C# TarEntry.Initialize方法的具体用法?C# TarEntry.Initialize怎么用?C# TarEntry.Initialize使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ICSharpCode.SharpZipLib.Tar.TarEntry
的用法示例。
在下文中一共展示了TarEntry.Initialize方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: CreateEntryFromFile
/// <summary>
/// Construct an entry for a file. File is set to file, and the
/// header is constructed from information from the file.
/// </summary>
/// <param name = "fileName">
/// The file that the entry represents.
/// </param>
public static TarEntry CreateEntryFromFile(string fileName)
{
TarEntry entry = new TarEntry();
entry.Initialize();
entry.GetFileTarHeader(entry.header, fileName);
return entry;
}
示例2: CreateTarEntry
/// <summary>
/// Construct an entry with only a name. This allows the programmer
/// to construct the entry's header "by hand". File is set to null.
/// </summary>
public static TarEntry CreateTarEntry(string name)
{
TarEntry entry = new TarEntry();
entry.Initialize();
entry.NameTarHeader(entry.header, name);
return entry;
}