MichalStrehovsky / SeeSharpSnake

Self-contained C# game in 8 kB
616 stars 63 forks source link

How to build Pal for System.IO.File, Path and Directory #23

Open sorainnosia opened 2 years ago

sorainnosia commented 2 years ago

To expose some of the functions?

MichalStrehovsky commented 2 years ago

Using the same strategy as the other PAL implementation - DllImport into the underlying operating system apis or into the C standard library (DllImport into libc or msvcrt.dll)

sorainnosia commented 2 years ago

Using the same strategy as the other PAL implementation - DllImport into the underlying operating system apis or into the C standard library (DllImport into libc or msvcrt.dll)

is there a way to know the Dll filename and system apis call?

MichalStrehovsky commented 2 years ago

That depends on the operating system and API you need. E.g. on Windows this would be somewhere around https://docs.microsoft.com/en-us/windows/win32/fileio/creating-and-opening-files.