
Import a Folder Hierarchy from a Zip File into a Repository Folder
importFolder.RdImports a folder hierarchy exported by exportFolder, recreating
the folder structure, analysis trees with their workflow steps, standalone files,
and links in the target repository location.
Usage
importFolder(
folderFile,
targetFolder,
onConflict = c("skip", "overwrite", "error"),
overwrite = FALSE
)Arguments
- folderFile
Character. Path to the folder export zip file created by
exportFolder.- targetFolder
Character. Path to the repository folder where the hierarchy will be imported. Must be an existing folder in the improve repository.
- onConflict
Character. Controls behavior when the target already contains resources with matching names. One of:
"skip"(Default) Reuse existing folders and trees. For files, skip without updating content. Existing resources are never deleted.
"overwrite"Reuse existing folders and trees. For files, update content with the exported version using
updateFileContent."error"Stop with an error listing all conflicting resources before any changes are made.
- overwrite
Logical. Deprecated. Use
onConflictinstead.TRUEmaps toonConflict = "overwrite".
Details
The import process:
Validates the export package (manifest.json, mapping files)
Creates the folder structure top-down by path depth
Creates analysis trees and imports their steps using the workflow import pattern
Uploads standalone files from the
folderFiles/directoryResolves folder-level links (internal links via id mapping, external links)
Resolves cross-tree step links in a second pass
Restores parent step relationships
Mapping Files
Same as importWorkflow: optional <exportName>LinkMapping.json
and <exportName>ToolMapping.json files can be placed alongside the zip.
See also
exportFolder for creating folder export files,
importWorkflow for importing single workflows