@@ -0,0 +1,1145 @@
+package learn_to_code.java_api.io_and_nio.nio;%0D%0A%0D%0Aimport learn_to_code.java_api.io_and_nio.io.FilesCreatorIO;%0D%0A%0D%0Aimport java.io.IOException;%0D%0Aimport java.nio.file.DirectoryStream;%0D%0Aimport java.nio.file.Files;%0D%0Aimport java.nio.file.Path;%0D%0Aimport java.nio.file.Paths;%0D%0A%0D%0Apublic class DirectoryStreamExample %7B%0D%0A    public static void main (String%5B%5D args) %7B%0D%0A%0D%0A        /* This 2 calls will create directories for both nio and io files.%0D%0A        * We will try to filter out only directory with 'nio' as part of the name*/%0D%0A        FilesCreatorNIO.createFiles();%0D%0A        FilesCreatorIO.createFiles();%0D%0A%0D%0A        Path startPath = Paths.get(FilesCreatorNIO.getDirNIOFiles()).getParent();%0D%0A%0D%0A        /* Only accept directories which contain NIO. DirectoryStream can be worked with using foreach cycle */%0D%0A        try (DirectoryStream%3CPath%3E ds = Files.newDirectoryStream(startPath,%0D%0A                e -%3E e.toString().toLowerCase().contains(%22nio%22))) %7B%0D%0A            for (Path path: ds) %7B%0D%0A                System.out.println(path.toAbsolutePath());%0D%0A            %7D%0D%0A%0D%0A        %7D catch (IOException e) %7B%0D%0A            e.printStackTrace();%0D%0A        %7D%0D%0A    %7D%0D%0A%7D%0D%0A

Add DirectoryStream example with filter