function setupSupportingFiles(metadata, workDir)
    for iFiles = 1:numel(metadata.files)
        f = metadata.files{iFiles};
        src = fullfile(f.componentDir, 'data', f.filename);
		pattern = [".m", ".mlx", ".slx", ".sfx", ".sldd", ".mlapp"];
        if endsWith(f.filename, pattern)
          src = fullfile(f.componentDir,'main',f.filename);
        end
        target = fullfile(workDir, f.filename);
        exampleUtils.copyIfMissing(src,target)
    end

    for iDirs = 1:numel(metadata.dirs)
        subdir = metadata.dirs{iDirs};
        src = fullfile(subdir.componentDir, 'data', subdir.dirname);
        target = fullfile(workDir, subdir.dirname);
        exampleUtils.copyIfMissing(src, target)
    end
end
