All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.aventstack.extentreports.offline.OfflineResxDelegate Maven / Gradle / Ivy

There is a newer version: 5.1.1
Show newest version
package com.aventstack.extentreports.offline;

import java.io.File;
import java.nio.file.Path;
import java.nio.file.Paths;

import com.aventstack.extentreports.io.ResourceUtil;
import com.aventstack.extentreports.utils.FileUtil;

public class OfflineResxDelegate {

	public static void saveOfflineResources(String baseResourceDirectory, String[] resx, String toPath) {
		FileUtil.createDirectory(toPath);
		for (String f : resx) {
			Path path = Paths.get(baseResourceDirectory, f);
			String fromPath = path.toString();
			String toPathComplete = Paths.get(toPath, new File(f).getName()).toString();
			ResourceUtil.moveResource(fromPath, toPathComplete);
		}
	}

	public static void saveOfflineResources(String[] resx, String toPath) {
		for (String f : resx) {
			ResourceUtil.moveResource(f, toPath);
		}
	}

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy