On Sun, May 25, 2025 at 12:32 PM Sean McAfee <eef...@gmail.com> wrote:

> I'll have to play around with your code a bit. Normally I would use
>> `.dir(test => /:i \.pdf / )`  to pull out PDF files.
>>
>
> Oh yeah, that's a bit better.  I'm not as familiar with the path API as I
> could be.
>

...Huh.  I was just messing around with the test parameter to dir and
noticed something that seems to be a bug.  If you call dir without any
parameters, the special directories "." and ".." are not returned, as
mentioned on this page <https://docs.raku.org/routine/dir>.  But if you
pass a test parameter, those directories are eligible to be returned.  For
example, dir(:test(/./)) returns ".".IO and "..".IO among its results.

Does anyone know if this is the intended behavior?  It doesn't really seem
useful.

Reply via email to