Also note that DOS 2.0 incurred quite significant changes to fs code, as it was the first version to support directories. Before that, the namespace was flat.
MS-DOS 1.25 does pattern matching mostly the same way [0]. The code is a bit simpler as it doesn't have the crazy macro stuff that MS-DOS 2.0 code has, but if you look a bit around the files, you'll see that it is mostly the same code just moved around and split in several files. The file scan works again in almost the same way, reading each directory entry one by one and doing the pattern matching after the fact.
[0] https://github.com/Microsoft/MS-DOS/blob/master/v1.25/source...
Read "x" as *, because I could not for the life of me get the star work as a star within a word in this comment.
Note that this is for MS-DOS 2.0 which didn't handle "*.FOO" searches on the kernel side (the star expansion was done on the COMMAND.COM side via the MakeFcb [2] procedure). MS-DOS 3.0 introduced the star wildcard on the kernel side, so it might have taken advantage of that... but there isn't source code for MS-DOS 3.0.
[0] https://github.com/Microsoft/MS-DOS/tree/master/v2.0/source
[1] https://github.com/Microsoft/MS-DOS/blob/master/v2.0/source/...
[2] https://github.com/Microsoft/MS-DOS/blob/master/v2.0/source/...