CreateDirectory function kernel32

Win32Result<bool> CreateDirectory(
  1. PCWSTR lpPathName,
  2. Pointer<SECURITY_ATTRIBUTES>? lpSecurityAttributes
)

Implementation

Win32Result<bool> CreateDirectory(
  PCWSTR lpPathName,
  Pointer<SECURITY_ATTRIBUTES>? lpSecurityAttributes,
) {
  resolveGetLastError();
  final result_ = _CreateDirectory(lpPathName, lpSecurityAttributes ?? nullptr);
  return .new(value: result_ != FALSE, error: GetLastError());
}