setFileName method

void setFileName(
  1. PCWSTR pszName
)

Sets the file name that appears in the File name edit box when that dialog box is opened.

Throws a WindowsException on failure.

To learn more, see learn.microsoft.com/windows/win32/api/shobjidl_core/nf-shobjidl_core-ifiledialog-setfilename.

Implementation

@pragma('vm:prefer-inline')
void setFileName(PCWSTR pszName) {
  final hr$ = HRESULT(_SetFileNameFn(ptr, pszName));
  if (hr$.isError) throw WindowsException(hr$);
}