csv-validator icon indicating copy to clipboard operation
csv-validator copied to clipboard

Valid strings for FileNameExpr

Open DavidUnderdown opened this issue 11 years ago • 1 comments

FileNameExpr is defined as a simple StringLiteral, but is it intended that in addition to simply representing the name of the file, this could be an expression such as * or *.jp2 to count all files, or files with a particular extension, within a directory (the path to which would be given by an optional filepath in the prepended StringProvider as FileNameExpr is only used in the second argument to a FileExpr) (see https://digital-preservation.github.io/csv-validator/csv-schema-1.0.html#file-related-sub-expressions )

DavidUnderdown avatar Apr 07 '14 15:04 DavidUnderdown

I think this would make sense for fileCount, but I am not sure it makes sense for fileExists or fileChecksum. Arguably there is a case for fileExists, but I think that the case for fileChecksum is weak at best.

We could certainly introduce a match syntax for file names/paths based on the standard Windows/Linux glob patterns, and use that instead (or as an alternative) of FileNameExpr for fileCount and fileExists. I have added the enhancement tag to this, as I feel it is a sensible feature request.

adamretter avatar Apr 08 '14 09:04 adamretter