IFsiDirectoryItem::AddTree method (imapi2fs.h)
Adds the contents of a directory tree to the file system image.
Syntax
HRESULT AddTree(
[in] BSTR sourceDirectory,
[in] VARIANT_BOOL includeBaseDirectory
);
Parameters
[in] sourceDirectory
String that contains the relative path of the directory tree to create.
Specify the full path when calling this method from the root directory item.
[in] includeBaseDirectory
Set to VARIANT_TRUE to include the directory in sourceDirectory as a subdirectory in the file system image. Otherwise, VARIANT_FALSE.
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 code | Description |
---|---|
|
Failed to allocate the required memory.
Value: 0x8007000E |
|
Pointer is not valid.
Value: 0x80004003 |
|
Failure enumerating files in the directory tree is inaccessible due to permissions.
Value: 0xC0AAB12BL |
|
One or more of the files in the directory tree is inaccessible due to permissions.
Value: 0xC0AAB12A |
|
Cannot read data from stream supplied for file '%1!ls!'.
Value: 0xC0AAB129 |
|
The value specified for parameter %1!ls! is not valid.
Value: 0xC0AAB101 |
|
ls!' is not part of the file system. It must be added to complete this operation.
Value: 0xC0AAB10B |
|
FileSystemImage object is in read only mode.
Value: 0xC0AAB102 |
|
Adding this file or directory would result in a result image having a size larger than the current configured limit.
Value: 0xC0AAB120 |
|
Path '%1!s!' is badly formed or contains invalid characters.
Value: 0xC0AAB110 |
|
ls!' name already exists.
Value: 0xC0AAB112 |
|
Attempt to add '%1!ls!' failed: cannot create a file-system-specific unique name for the %2!ls! file system.
Value: 0xC0AAB113 |
|
ISO9660 is limited to 8 levels of directories.
Value: 0xC0AAB131 |
|
This file system image has too many directories for the %1!ls! file system.
Value: 0xC0AAB130 |
|
The directory '%1!s!' not found in FileSystemImage hierarchy.
Value: 0xC0AAB11A |
Remarks
The parent directory for the new subdirectory must already exist within the file system image.
The subdirectory structure within specified source directory is implicitly mirrored in the file system image.
If file or directory collisions occur, the content of the specified source directory prevails. The file system image is overwritten with the appropriate directories and files from the source directory.
If an exception occurs during processing, the file system image reverts to its previous state.
Requirements
Requirement | Value |
---|---|
Minimum supported client | Windows Vista, Windows XP with SP2 [desktop apps only] |
Minimum supported server | Windows Server 2003 [desktop apps only] |
Target Platform | Windows |
Header | imapi2fs.h |