/// <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)); } }
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); }