Node path 获取文件名
Oct 25, 2021
2 min read
获取路径中的文件名+文件扩展名
如果设置第二个参数表示过滤“.扩展名”,只要文件名称
path
.
basename
(
path
[,
ext
])