public void importFiles(IEnumerable <String> files, String targetPath) { Queue <String> conflictedFiles = new Queue <string>(); foreach (String file in files) { if (resourceProvider.exists(Path.Combine(targetPath, Path.GetFileName(file)))) { conflictedFiles.Enqueue(file); } else { resourceProvider.addFile(file, targetPath); } } importConflictedFiles(conflictedFiles, targetPath); }
public override bool applyToExisting(Slide slide, SlidePanel panel, bool overwriteContent, EditorResourceProvider resourceProvider) { //Do the base version first, this will fix any filenames bool result = base.applyToExisting(slide, panel, overwriteContent, resourceProvider); if (result) { if (panel is RmlSlidePanel) { String rmlPath = ((RmlSlidePanel)panel).getRmlFilePath(slide); if (overwriteContent || !resourceProvider.exists(rmlPath)) { resourceProvider.ResourceCache.add(new ResourceProviderTextCachedResource(rmlPath, Encoding.UTF8, Rml, resourceProvider)); } } else { result = false; } } return(result); }