Exemple #1
0
 /// <inheritdoc/>
 protected override void HandleDirectory(DirectoryInfo entry)
 {
     if (entry.IsSymlink(out string?target))
     {
         _builder.AddSymlink(entry.RelativeTo(Source), target);
     }
     else
     {
         _builder.AddDirectory(entry.RelativeTo(Source));
     }
 }
Exemple #2
0
 protected override void AddElements(IForwardOnlyBuilder builder)
 {
     builder.AddFile("normal", TestFile.DefaultContents.ToStream(), TestFile.DefaultLastWrite);
     builder.AddFile("executable", TestFile.DefaultContents.ToStream(), TestFile.DefaultLastWrite, executable: true);
     builder.AddSymlink("symlink", target: "abc");
     builder.AddDirectory("dir");
     builder.AddFile(Path.Combine("dir", "sub"), TestFile.DefaultContents.ToStream(), TestFile.DefaultLastWrite);
 }