Data update
This commit is contained in:
parent
4bb20c9b71
commit
cbaf4c4b64
12390 changed files with 318560 additions and 27248 deletions
|
|
@ -3,17 +3,17 @@ import java.nio.file.*;
|
|||
import java.nio.file.attribute.BasicFileAttributes;
|
||||
|
||||
public class WalkTree {
|
||||
public static void main(String[] args) throws IOException {
|
||||
Path start = FileSystems.getDefault().getPath("/path/to/file");
|
||||
Files.walkFileTree(start, new SimpleFileVisitor<Path>() {
|
||||
@Override
|
||||
public FileVisitResult visitFile(Path file,
|
||||
BasicFileAttributes attrs) throws IOException {
|
||||
if (file.toString().endsWith(".mp3")) {
|
||||
System.out.println(file);
|
||||
}
|
||||
return FileVisitResult.CONTINUE;
|
||||
}
|
||||
});
|
||||
}
|
||||
public static void main(String[] args) throws IOException {
|
||||
Path start = FileSystems.getDefault().getPath("/path/to/file");
|
||||
Files.walkFileTree(start, new SimpleFileVisitor<Path>() {
|
||||
@Override
|
||||
public FileVisitResult visitFile(Path file,
|
||||
BasicFileAttributes attrs) throws IOException {
|
||||
if (file.toString().endsWith(".mp3")) {
|
||||
System.out.println(file);
|
||||
}
|
||||
return FileVisitResult.CONTINUE;
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -2,11 +2,11 @@ import java.io.IOException;
|
|||
import java.nio.file.*;
|
||||
|
||||
public class WalkTree {
|
||||
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 );
|
||||
}
|
||||
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 );
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue