| Previous | Next |
| IMAPI_E_FILE_SYSTEM_NOT_EMPTY | IMAPI_E_NOT_DIR |
IMAPI_E_NOT_FILE
IMAPI_E_NOT_FILE is a type mismatch inside the IMAPI2FS hierarchy. Directory and file entries are represented through IFsiItem, with specialized IFsiDirectoryItem and IFsiFileItem interfaces. A path can exist successfully yet still be invalid for an operation that specifically requires a file.
Verify the item kind before performing file-only work
- Resolve the path with the directory hierarchy and record the returned item name and path.
- Use the appropriate interface test or
QueryInterfaceresult to distinguish directory items from file items. - Do not treat “exists” as equivalent to “is a file”; keep existence and type checks separate.
This HRESULT is particularly useful when generated paths collide with an existing directory. Recreating the source file or changing its stream will not help if the image path already denotes a directory object. Trace the hierarchy mutation that created that path and decide whether the caller should use a different target name, remove the directory, or invoke a directory-specific operation instead.
get_Item · IFsiDirectoryItem · IFsiFileItem
Looking for a different code? Search another status or error code.