org.springframework.util.StringUtils#getFilename ( )源码实例Demo

下面列出了org.springframework.util.StringUtils#getFilename ( ) 实例代码,或者点击链接到github查看源代码,也可以在右侧发表评论。

private void generate(Directory root, File pomFile, boolean generateChecksums) {
	String name = StringUtils.getFilename(pomFile.getName());
	String extension = StringUtils.getFilenameExtension(pomFile.getName());
	String prefix = name.substring(0, name.length() - extension.length() - 1);
	File[] files = pomFile.getParentFile().listFiles((f) -> include(f, prefix));
	MultiValueMap<File, MavenCoordinates> fileCoordinates = new LinkedMultiValueMap<>();
	for (File file : files) {
		String rootPath = StringUtils.cleanPath(root.getFile().getPath());
		String relativePath = StringUtils.cleanPath(file.getPath()).substring(rootPath.length() + 1);
		fileCoordinates.add(file.getParentFile(), MavenCoordinates.fromPath(relativePath));
	}
	fileCoordinates.forEach((file, coordinates) -> writeMetadata(file, coordinates, generateChecksums));
}
 
源代码2 项目: spring-analysis-note   文件: UrlResource.java
/**
 * This implementation returns the name of the file that this URL refers to.
 * @see java.net.URL#getPath()
 */
@Override
public String getFilename() {
	return StringUtils.getFilename(this.cleanedUrl.getPath());
}
 
源代码3 项目: spring-analysis-note   文件: ClassPathResource.java
/**
 * This implementation returns the name of the file that this class path
 * resource refers to.
 * @see org.springframework.util.StringUtils#getFilename(String)
 */
@Override
@Nullable
public String getFilename() {
	return StringUtils.getFilename(this.path);
}
 
/**
 * This implementation returns the name of the file that this ServletContext
 * resource refers to.
 * @see org.springframework.util.StringUtils#getFilename(String)
 */
@Override
@Nullable
public String getFilename() {
	return StringUtils.getFilename(this.path);
}
 
源代码5 项目: java-technology-stack   文件: UrlResource.java
/**
 * This implementation returns the name of the file that this URL refers to.
 * @see java.net.URL#getPath()
 */
@Override
public String getFilename() {
	return StringUtils.getFilename(this.cleanedUrl.getPath());
}
 
源代码6 项目: java-technology-stack   文件: ClassPathResource.java
/**
 * This implementation returns the name of the file that this class path
 * resource refers to.
 * @see org.springframework.util.StringUtils#getFilename(String)
 */
@Override
@Nullable
public String getFilename() {
	return StringUtils.getFilename(this.path);
}
 
/**
 * This implementation returns the name of the file that this ServletContext
 * resource refers to.
 * @see org.springframework.util.StringUtils#getFilename(String)
 */
@Override
@Nullable
public String getFilename() {
	return StringUtils.getFilename(this.path);
}
 
源代码8 项目: lams   文件: UrlResource.java
/**
 * This implementation returns the name of the file that this URL refers to.
 * @see java.net.URL#getPath()
 */
@Override
public String getFilename() {
	return StringUtils.getFilename(this.cleanedUrl.getPath());
}
 
@Override
public String getFilename() {
	return StringUtils.getFilename(this.path);
}
 
源代码10 项目: mica   文件: FileUtil.java
/**
 * 获取文件后缀名
 *
 * @param path 文件路径
 * @return {String}
 */
@Nullable
public static String getFilename(@Nullable String path) {
	return StringUtils.getFilename(path);
}
 
源代码11 项目: lams   文件: ServletContextResource.java
/**
 * This implementation returns the name of the file that this ServletContext
 * resource refers to.
 * @see org.springframework.util.StringUtils#getFilename(String)
 */
@Override
public String getFilename() {
	return StringUtils.getFilename(this.path);
}
 
源代码12 项目: lams   文件: ClassPathResource.java
/**
 * This implementation returns the name of the file that this class path
 * resource refers to.
 * @see org.springframework.util.StringUtils#getFilename(String)
 */
@Override
public String getFilename() {
	return StringUtils.getFilename(this.path);
}
 
源代码13 项目: spring4-understanding   文件: ClassPathResource.java
/**
 * This implementation returns the name of the file that this class path
 * resource refers to.
 * @see org.springframework.util.StringUtils#getFilename(String)
 */
@Override
public String getFilename() {
	return StringUtils.getFilename(this.path);
}
 
/**
 * This implementation returns the name of the file that this ServletContext
 * resource refers to.
 * @see org.springframework.util.StringUtils#getFilename(String)
 */
@Override
public String getFilename() {
	return StringUtils.getFilename(this.path);
}