using System.IO;
using System;
public class Program
{
public static void Main()
var testPairs = new [] {
("/home", "file.txt"),
("/home/", "file.txt"),
("/home", "/file.txt"),
("/home/", "/file.txt"),
};
foreach(var (dir, file) in testPairs)
Console.WriteLine($"Dir: {dir,-7} File: {file,-9} => {Path.Combine(dir, file)}");
}