DeleteFile function Null safety kernel32

int DeleteFile(
  1. Pointer<Utf16> lpFileName
)

Deletes an existing file.

BOOL DeleteFileW(
  LPCWSTR lpFileName
);

Implementation

int DeleteFile(Pointer<Utf16> lpFileName) {
  final _DeleteFile = _kernel32.lookupFunction<
      Int32 Function(Pointer<Utf16> lpFileName),
      int Function(Pointer<Utf16> lpFileName)>('DeleteFileW');
  return _DeleteFile(lpFileName);
}