RemoveDirectory function Null safety kernel32

int RemoveDirectory (
  1. Pointer<Utf16> lpPathName
)

Deletes an existing empty directory.

BOOL RemoveDirectoryW(
  LPCWSTR lpPathName
);

Implementation

int RemoveDirectory(Pointer<Utf16> lpPathName) {
  final _RemoveDirectory = _kernel32.lookupFunction<
      Int32 Function(Pointer<Utf16> lpPathName),
      int Function(Pointer<Utf16> lpPathName)>('RemoveDirectoryW');
  return _RemoveDirectory(lpPathName);
}