Skip to content

Instantly share code, notes, and snippets.

@TheAngryByrd
Created July 27, 2022 14:39
Show Gist options
  • Save TheAngryByrd/780dbc896fd0381ed76432d75bdf609f to your computer and use it in GitHub Desktop.
Save TheAngryByrd/780dbc896fd0381ed76432d75bdf609f to your computer and use it in GitHub Desktop.
CurrentDirectory.fs
type CurrentDirectory = {
``System.AppContext.BaseDirectory`` : string
``AppDomain.CurrentDomain.BaseDirectory`` : string
/// Environment.CurrentDirectory is the same
``Directory.GetCurrentDirectory()`` : string
}
with
static member Create() =
{
``System.AppContext.BaseDirectory`` = System.AppContext.BaseDirectory
``AppDomain.CurrentDomain.BaseDirectory`` = System.AppDomain.CurrentDomain.BaseDirectory
``Directory.GetCurrentDirectory()`` = System.IO.Directory.GetCurrentDirectory()
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment