mirror of
https://github.com/Smaug123/PulumiConfig
synced 2025-10-05 08:38:41 +00:00
20 lines
463 B
Forth
20 lines
463 B
Forth
namespace PulumiWebServer.Test
|
|
|
|
open System.IO
|
|
|
|
[<RequireQualifiedAccess>]
|
|
module Utils =
|
|
|
|
type Dummy = class end
|
|
|
|
let rec findFileAbove (fileName : string) (di : DirectoryInfo) =
|
|
if isNull di then
|
|
failwith "hit the root without finding anything"
|
|
|
|
let candidate = Path.Combine (di.FullName, fileName) |> FileInfo
|
|
|
|
if candidate.Exists then
|
|
candidate
|
|
else
|
|
findFileAbove fileName di.Parent
|