Skip to content

Adding a Directory Iterator #21

@DavidJAKoogler

Description

@DavidJAKoogler

HAC is a much better scripting tool than Bash shell (and I like it better than Python scripts). Ada scripts are much more readable and intuitive than the strange hieroglyphics of Bash and sometimes strange side-effects of Python. I have written a dozen little HAC scripts so far and am pleased with the results. However, HAC's directory services are some what week and the lack of an iteration mechanism over a directory is a drawback for writing significant scripts.

I believe the underlying Ada.Directory package does have an iterator or a Read_Directory routine. There are also several useful path name routines in the package that should be exposed to HAC via the HAT package.

Motivation: try writing a script to apply a transformation to a set of files found in a directory or subdirectory(ies). Best I can do with HAC is to play around with the system operator and call upon the Unix ls command and parse the results. It is slow and painful.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions