0

Using minimatch I can get all the files with the following pattern !*.* but it also matches folder and no longer matches correctly within folders.

I'm testing the patterns here => http://pthrasher.github.io/minimatch-test/

With the following data

404
404.html
index
index.html
apples/
apples/a
apples/a.html
apples/b
apples/b.html
oranges/
oranges/c
oranges/c.html
oranges/d
oranges/d.html

Expected outcome would be

404
index
apples/a
apples/b
oranges/c
oranges/d
4

1 回答 1

0

My current solution was to use a few patterns:

  • one for the "index"
  • one for the "404"
  • one for any files without extensions within folders "*/!(*.*)"
于 2020-06-24T13:37:51.953 回答