Exemple #1
0
        protected virtual void WriteHeader(string name, DateTime lastModificationTime, long count, int userId, int groupId, int mode)
        {
            var header = new TarHeader
            {
                FileName         = name,
                LastModification = lastModificationTime,
                SizeInBytes      = count,
                UserId           = userId,
                GroupId          = groupId,
                Mode             = mode
            };

            OutStream.Write(header.GetHeaderValue(), 0, header.HeaderSize);
        }
Exemple #2
0
        protected virtual void WriteHeader(string name, DateTime lastModificationTime, long count, int userId, int groupId, int mode, EntryType entryType)
        {
            TarHeader tarHeader = new TarHeader()
            {
                FileName         = name,
                LastModification = lastModificationTime,
                SizeInBytes      = count,
                UserId           = userId,
                GroupId          = groupId,
                Mode             = mode,
                EntryType        = entryType
            };

            this.OutStream.Write(tarHeader.GetHeaderValue(), 0, tarHeader.HeaderSize);
        }
Exemple #3
0
 protected virtual async Task WriteHeaderAsync(string name, DateTime lastModificationTime,
                                               long count, int userId, int groupId, int mode, EntryType entryType)
 {
     var header = new TarHeader
     {
         FileName         = name,
         LastModification = lastModificationTime,
         SizeInBytes      = count,
         UserId           = userId,
         GroupId          = groupId,
         Mode             = mode,
         EntryType        = entryType
     };
     await OutStream.WriteAsync(header.GetHeaderValue(), 0, header.HeaderSize);
 }
Exemple #4
0
 protected virtual void WriteHeader(string name, DateTime lastModificationTime, long count, int userId, int groupId, int mode)
 {
     var header = new TarHeader
                  {
                      FileName = name,
                      LastModification = lastModificationTime,
                      SizeInBytes = count,
                      UserId = userId,
                      GroupId = groupId,
                      Mode = mode
                  };
     OutStream.Write(header.GetHeaderValue(), 0, header.HeaderSize);
 }