Ok, I found out the cause of the behavior with leading dots. The unix
version of rexxutil uses the fnmatch() function for matching filenames that
might include "globbing". One of the options it is using is FMN_PERIOD,
which does not allow a leading period to be be matched by a wildcard
character. Thus "*" will not match ".foo", but ".*" will. It turns out that
my current code will not have the directory recursion issue, but still will
have the issue with returning entries for the dot names. The fix is fairly
trivial, which is to remove that option. Is this what people really want?

One suggestion I have is people try this out with a private build. There
are four places where the FMN_PERIOD option is used. Just remove that flag,
which will change the behavior. I will hold off on making that change in my
version until I get some feedback on this.

Rick

On Fri, Jan 25, 2019 at 9:39 AM Michael Lueck <mlu...@lueckdatasystems.com>
wrote:

> Greetings ooRexx'ers,
>
> Erich Steinböck wrote:
> > As far as I can see, the issue is a) you cannot list hidden (leading
> dot) and normal files in one call and b) SysFileTree won't recurse into a
> hidden directory
> >
> > Here is a test scenario:
>
>
> Yes Erich, that is succinctly the issue comparing native command line
> tools to SysFileTree on Linux.
>
> On Windows, Hidden is just one of the file system's attribute flags.
>
> On *nix systems, the leading dot in the object's name means "hidden".
>
> The leading dot for SysFileTree makes it very difficult to obtain a
> complete listing of all objects recursively for a given path.
>
> RFE #482 is a request to make the ooRexx use of SysFileTree consistent
> across Windows and *nix. +1 request for burring platform shim code down in
> C/C++ land so the ooRexx API behaves consistently
> across platforms.
>
> I am thankful,
> --
> Michael Lueck
> Lueck Data Systems
> http://www.lueckdatasystems.com/
>
>
> _______________________________________________
> Oorexx-devel mailing list
> Oorexx-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/oorexx-devel
>
_______________________________________________
Oorexx-devel mailing list
Oorexx-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/oorexx-devel

Reply via email to