| Previous | Next |
| IMAPI_E_NOT_FILE | IMAPI_E_DIR_NOT_EMPTY |
IMAPI_E_NOT_DIR
IMAPI_E_NOT_DIR is the directory-side counterpart of a file-type mismatch. IMAPI2FS maintains files and directories as distinct item interfaces even though both share IFsiItem. An operation that needs a directory cannot continue when the resolved image path points to a file entry.
Inspect the image hierarchy at the exact failing path
- Log the normalized path passed to the IMAPI method, not only the original source path.
- Retrieve the item and check whether it exposes
IFsiDirectoryItembefore descending or adding children. - Look for an earlier name collision that inserted a file where the builder expected a directory.
The failure is about the in-memory image namespace, so filesystem checks against the host directory are insufficient. A source directory can exist on disk while a same-named file already occupies the destination path in the image. Preserve the order of Add, AddFile, and tree-import operations to identify which mutation established the conflicting item type.
get_Item · AddDirectory · IFsiDirectoryItem
Looking for a different code? Search another status or error code.