Test ran at 2024-12-10 12:39:41.080313+00:00 SOLUTION: dir_iterators=0.0.4: Ways of moving around directory trees Origin: commit 88741e32827693dd37a1f9d7d7b72703d4ddd42e from https://github.com/pyjarrett/dir_iterators.git Properties: Author: Paul Jarrett Description: Ways of moving around directory trees License: Apache-2.0 Long_Description: [![Build Status](https://github.com/pyjarrett/dir_iterators/actions/workflows/build.yml/badge.svg)](https://github.com/pyjarrett/dir_iterators/actions) [![Alire](https://img.shields.io/endpoint?url=https://alire.ada.dev/badges/dir_iterators.json)](https://alire.ada.dev/crates/dir_iterators.html) ## Iterator-based directory walks Provides convenient ways to walk directories based on Ada 2012 user-defined iterators. Inspired by [walkdir for Rust](https://github.com/BurntSushi/walkdir). ## Walking a directory tree recursively ```ada with Ada.Directories; with Ada.Text_IO; with Dir_Iterators.Recursive; -- ... Dir_Walk : constant Dir_Iterators.Recursive.Recursive_Dir_Walk := Dir_Iterators.Recursive.Walk (Dir); for Dir_Entry of Dir_Walk loop Ada.Text_IO.Put_Line(Ada.Directories.Full_Name(Dir_Entry)); end loop; ``` ## Walking a directory tree recursively with a filter Use a filter to prune directories and files from the walk. ```ada with Ada.Directories; with Ada.Text_IO; with Dir_Iterators.Recursive; package AD renames Ada.Directories; -- ... procedure Foo (Include_Dot_Files : Boolean; Dir_Root : String) is function Filter (E : Ada.Directories.Directory_Entry_Type) return Boolean is Name : constant String := Ada.Directories.Simple_Name(E); begin return Include_Dot_Files or else (not (Name'Length > 1 and then Name(1) = '.')); end Filter; Walk : constant Dir_Iterators.Recursive.Recursive_Dir_Walk := Dir_Iterators.Recursive.Walk (Dir_Root, Filter'Access); begin for Dir_Entry of Walk loop Ada.Text_IO.Put_Line(Ada.Directories.Full_Name(Dir_Entry)); end loop; end Foo; ``` Maintainer: Paul Jarrett Maintainers_Logins: pyjarrett Name: dir_iterators Tag: dir Tag: files Tag: walk Version: 0.0.4 Website: https://github.com/pyjarrett/dir_iterators LOG: Note: Deploying dir_iterators=0.0.4... Note: Building dir_iterators/dir_iterators.gpr... Setup [mkdir] object directory for project Dir_Iterators [mkdir] library directory for project Dir_Iterators Compile [Ada] dir_iterators-recursive.adb [Ada] dir_iterators.ads [Ada] dir_iterators-ancestor.adb Build Libraries [gprlib] Dir_Iterators.lexch [archive] libDir_Iterators.a [index] libDir_Iterators.a Build finished successfully in 1.09 seconds. dir_iterators=0.0.4 successfully retrieved and built. There are no dependencies. Found declared GPR file: dir_iterators.gpr