From: Mark M. <mie...@ac...> - 2007-05-15 00:48:48
|
There is a request for enhancement asking to add an option to SysFileTree for case independent file name matching. Rick commented that we should discuss whether this can or should be implemented. Since this had caught my eye, I implemented it in my working copy, have tested it, and it works. So the answer to the first question is, yes, it can be implemented. Which leaves the second question, should we? The implementation adds an 'I' option to SysFileTree for case Independent. On Windows this resolves to a nop, file name matching is case independent already. Steve Swift is the person that opened the RFE and the use case he presented is this: On a web server where users can upload files, he wants to find all .jpg files. The files are put onto the server from various OSes by any number of users, so there is no naming convention. The files could be named *.jpg, *.JPG, or what ever else a user may fancy. I thinks this is a compelling use case. In a similar vein, a couple of months ago I needed to find all the read me files in a large and diverse source code tree. (Now, I actually used find and grep, but if I had wanted to do some processing of each file, it would have been nice to have a case independent SysFileTree.) Testing case independent SysFileTree on my system produced this: [root@Falcon wc]# ./sysFileTest.rex File spec: *read* Case insensitive, recursive Current directory: /work.ooRexx/wc File: /work.ooRexx/wc/docs_3.1.2/readme.pdf File: /work.ooRexx/wc/docs_3.1.2/README.txt File: /work.ooRexx/wc/docs_3.1.2/readme/readme.pdf File: /work.ooRexx/wc/docs_3.1.2/readme/readme.sgml File: /work.ooRexx/wc/docs_3.1.2/readme/readme.html File: /work.ooRexx/wc/docs/README.txt File: /work.ooRexx/wc/docs/readme/readme.pdf ... So, I see valid use cases for this enhancement. Comments? -- Mark Miesfeld mie...@ac... |