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

net.wicp.tams.cas.BusiTools Maven / Gradle / Ivy

There is a newer version: 1.3.2
Show newest version
package net.wicp.tams.cas;

import java.io.File;

import org.apache.commons.io.FileUtils;

import lombok.extern.slf4j.Slf4j;
import net.wicp.tams.common.apiext.IOUtil;

@Slf4j
public abstract class BusiTools {
	public static String getVersion(String dirPath, String relaPath) {
		try {
			String context = FileUtils.readFileToString(new File(IOUtil.mergeFolderAndFilePath(dirPath, relaPath)));
			int indexOf = context.indexOf("\r\n");
			String version = context.substring(8, indexOf);
			return version;
		} catch (Exception e) {
			log.error("解析tar文件失败", e);
			return "last";
		}
	}


	
	

	

	

	
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy