Ejemplo n.º 1
0
 private void WriteStream(string path, TreeEntry entry, DateTimeOffset modificationTime, Func <Stream> streamer)
 {
     using (Stream contentStream = streamer())
     {
         writer.Write(path,
                      contentStream,
                      modificationTime,
                      (entry.Mode == Mode.ExecutableFile)
                          ? "775".OctalToInt32()
                          : "664".OctalToInt32(),
                      "0",
                      "0",
                      '0',
                      "root",
                      "root",
                      "0",
                      "0",
                      entry.TargetId.Sha,
                      false);
     }
 }
Ejemplo n.º 2
0
 /// <summary>
 /// Implements the archiving of a TreeEntry in a given format.
 /// </summary>
 /// <param name="path">The path of the entry in the archive.</param>
 /// <param name="entry">The entry to archive.</param>
 /// <param name="modificationTime">The datetime the entry was last modified.</param>
 protected abstract void AddTreeEntry(string path, TreeEntry entry, DateTimeOffset modificationTime);