我有以下代码片段:
我有以下代码片段:
Files.find( startPath, Integer.MAX_VALUE, ( path, attributes ) -> path.toFile().isFile() )
.map( p -> startPath.relativize( p ).toString() ).collect( Collectors.toList() );
这将返回给定路径内相对路径下的文件名列表。我在额外排除所有放置在文件结构中某个隐藏文件夹中的文件方面遇到了困难。有什么建议吗?