IFsiDirectoryItem::Add method

Adds a file or directory described by the IFsiItem object to the file system image.

Syntax


HRESULT Add(
  [in] IFsiItem *item
);

Parameters

item [in]

An IFsiItem interface of the IFsiFileItem or IFsiDirectoryItem to add to the file system image.

Return value

S_OK is returned on success, but other success codes may be returned as a result of implementation. The following error codes are commonly returned on operation failure, but do not represent the only possible error values:

Return codeDescription
E_POINTER

Pointer is not valid.

Value: 0x80004003

IMAPI_E_INVALID_PATH

Path '%1!s!' is badly formed or contains invalid characters.

Value: 0xC0AAB110

IMAPI_E_DATA_STREAM_READ_FAILURE

Cannot read data from stream supplied for file '%1!ls!'.

Value: 0xC0AAB129

IMAPI_E_DUP_NAME

ls!' name already exists.

Value: 0xC0AAB112

IMAPI_E_NO_UNIQUE_NAME

Attempt to add '%1!ls!' failed: cannot create a file-system-specific unique name for the %2!ls! file system.

Value: 0xC0AAB113

IMAPI_E_IMAGE_SIZE_LIMIT

Adding '%1!ls!' would result in a result image having a size larger than the current configured limit.

Value: 0xC0AAB120

IMAPI_E_ISO9660_LEVELS

ISO9660 is limited to 8 levels of directories.

Value: 0xC0AAB131

IMAPI_E_TOO_MANY_DIRS

This file system image has too many directories for the %1!ls! file system.

Value: 0xC0AAB130

IMAPI_E_DIR_NOT_FOUND

The directory '%1!s!' not found in FileSystemImage hierarchy.

Value: 0xC0AAB11A

IMAPI_E_NOT_IN_FILE_SYSTEM

This file or directory is not part of the file system. It must be added to complete this operation.

Value: 0xC0AAB10B

IMAPI_E_READONLY

FileSystemImage object is in read only mode.

Value: 0xC0AAB102

IMAPI_E_IMAGE_SIZE_LIMIT

Adding this file or directory would result in a result image having a size larger than the current configured limit.

Value: 0xC0AAB120

E_OUTOFMEMORY

Failed to allocate the required memory.

Value: 0x8007000E

 

Note  Values returned by the IUnknown::QueryInterface method may also be returned here.
 

Remarks

To create a directory item or file item, call the IFileSystemImage::CreateDirectoryItem or IFileSystemImage::CreateFileItem method, respectively.

Once an item is added to the file system image, the IFsiFileItem::get_Data property becomes read-only.

Requirements

Minimum supported client

Windows Vista, Windows XP with SP2 [desktop apps only]

Minimum supported server

Windows Server 2003 [desktop apps only]

IDL

Imapi2fs.idl

See also

IFsiDirectoryItem
IFsiFileItem
IFsiDirectoryItem::AddDirectory
IFsiDirectoryItem::AddFile
IFsiDirectoryItem::Remove

 

 

Community Additions

ADD
Show: