RemoveDirectoryFromAppW function (fileapifromapp.h)

Deletes an existing empty directory. The behavior of this function is identical to RemoveDirectory, except that this function adheres to the Universal Windows Platform (UWP) app security model.

Syntax

WINSTORAGEAPI BOOL RemoveDirectoryFromAppW(
  LPCWSTR lpPathName
) noexcept;

Parameters

lpPathName

The path of the directory to be removed. This path must specify an empty directory, and the calling process must have delete access to the directory.

For information about opting out of the MAX_PATH limitation without prepending "\\?\", see the "Maximum Path Length Limitation" section of Naming Files, Paths, and Namespaces for details.

Return value

If the function succeeds, the return value is nonzero.

If the function fails, the return value is zero (0). To get extended error information, call GetLastError.

Requirements

Requirement Value
Minimum supported client Windows 10, version 1803
Header fileapifromapp.h

See also

Naming Files, Paths, and Namespaces

RemoveDirectory