protected virtual void WriteHeader(string name, DateTime lastModificationTime, long count, string userName, string groupName, int mode) { var tarHeader = new UsTarHeader() { FileName = name, LastModification = lastModificationTime, SizeInBytes = count, UserId = userName.GetHashCode(), UserName = userName, GroupId = groupName.GetHashCode(), GroupName = groupName, Mode = mode }; OutStream.Write(tarHeader.GetHeaderValue(), 0, tarHeader.HeaderSize); }
protected override void WriteHeader(string name, DateTime lastModificationTime, long count, int userId, int groupId, int mode) { var tarHeader = new UsTarHeader() { FileName = name, LastModification = lastModificationTime, SizeInBytes = count, UserId = userId, UserName = Convert.ToString(userId,8), GroupId = groupId, GroupName = Convert.ToString(groupId,8), Mode = mode }; OutStream.Write(tarHeader.GetHeaderValue(), 0, tarHeader.HeaderSize); }
protected override void WriteHeader(string name, DateTime lastModificationTime, long count, int userId, int groupId, int mode) { var tarHeader = new UsTarHeader() { FileName = name, LastModification = lastModificationTime, SizeInBytes = count, UserId = userId, UserName = Convert.ToString(userId, 8), GroupId = groupId, GroupName = Convert.ToString(groupId, 8), Mode = mode }; OutStream.Write(tarHeader.GetHeaderValue(), 0, tarHeader.HeaderSize); }
/// <summary> /// Constructs TarReader object to read data from `tarredData` stream /// </summary> /// <param name="tarredData">A stream to read tar archive from</param> public TarReader(Stream tarredData) { inStream = tarredData; header = new UsTarHeader(); }