void DeleteFile(MockDirectory parent, Span <string> dirs) { if (dirs.Length == 0) { ThrowCommonException(); } if (dirs.Length == 1) { parent.RemoveFile(dirs[0]); return; } DeleteFile(GetDirectoryOrThrow(parent, dirs[0]), dirs.Slice(1)); }