本文整理了Java中com.sap.psr.vulas.shared.util.FileUtil.getPath()
方法的一些代码示例,展示了FileUtil.getPath()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。FileUtil.getPath()
方法的具体详情如下:
包路径:com.sap.psr.vulas.shared.util.FileUtil
类名称:FileUtil
方法名:getPath
[英]Returns a Path object for the given String in case the path exists in the file system, null otherwise.
[中]如果路径存在于文件系统中,则返回给定字符串的路径对象,否则返回null。
代码示例来源:origin: SAP/vulnerability-assessment-tool
/**
* Returns a {@link Path} object for the given {@link String} in case the path exists in the file system, null otherwise.
* @param _path
* @return
*/
public static Path getPath(String _path) {
return FileUtil.getPath(_path, false);
}
代码示例来源:origin: SAP/vulnerability-assessment-tool
this.setLibPath(FileUtil.getPath(VulasConfiguration.getGlobal().getConfiguration().getString(CoreConfiguration.INSTR_LIB_DIR, null)));
this.setInclPath(FileUtil.getPath(VulasConfiguration.getGlobal().getConfiguration().getString(CoreConfiguration.INSTR_INCLUDE_DIR, null)));
this.setTargetPath(FileUtil.getPath(VulasConfiguration.getGlobal().getConfiguration().getString(CoreConfiguration.INSTR_TARGET_DIR, null), true));
代码示例来源:origin: SAP/vulnerability-assessment-tool
/**
* Expects a {@link String} array with multiple paths and returns a set for all those paths that represent
* accessible files or directories in the file system.
* @param _p
*/
public static Set<Path> getPaths(String[] _paths) {
final Set<Path> r = new HashSet<Path>();
if(_paths!=null) {
for(int i=0; i<_paths.length; i++) {
final Path p = FileUtil.getPath(_paths[i]);
if(p!=null)
r.add(p);
}
}
return r;
}
内容来源于网络,如有侵权,请联系作者删除!