Start of project system

+ added Directory.IsEmpty
This commit is contained in:
Simon Lübeß
2023-07-30 13:23:34 +02:00
parent 14a802d057
commit df67f32399
6 changed files with 356 additions and 37 deletions
@@ -0,0 +1,13 @@
namespace System.IO;
extension Directory
{
[Import("Shlwapi.lib"), CLink, CallingConvention(.Stdcall)]
private static extern System.Windows.IntBool PathIsDirectoryEmptyW(char16* pszPath);
public static bool IsEmpty(StringView fileName)
{
// TODO: This is obviously windows only
return PathIsDirectoryEmptyW(fileName.ToScopedNativeWChar!());
}
}