2023-07-01 11:58:00 -04:00
|
|
|
import java.io.IOException;
|
|
|
|
|
import java.nio.file.*;
|
|
|
|
|
|
|
|
|
|
public class WalkTree {
|
2026-04-30 12:34:36 -04:00
|
|
|
public static void main(String[] args) throws IOException {
|
|
|
|
|
Path start = FileSystems.getDefault().getPath("/path/to/file");
|
|
|
|
|
Files.walk(start)
|
|
|
|
|
.filter( path -> path.toFile().isFile())
|
|
|
|
|
.filter( path -> path.toString().endsWith(".mp3"))
|
|
|
|
|
.forEach( System.out::println );
|
|
|
|
|
}
|
2023-07-01 11:58:00 -04:00
|
|
|
}
|