Просмотр исходного кода

Revamp path.glob.

The problem with the previous implementation is that it would iterate
over all elements in a dir even if 'pattern' had no metacharacters. First,
that was slow -- if you handed

  /cygdrive/w/My Documents/boost/test/a.cpp

to it, it would crawl all the way to the top, listing each directory and
checking each file. Second, it would fail, because Cygwin is broken and
does not show 'cygdrive' is the list of directory elements of '/'.

Now we check if a pattern has metacharacters, and if not, just do
a simple 'timestamp' call.

The new glob is implemented as new 'GLOB-RECURSIVELY' builtin. I've decided
to use builtin since otherwise, we'd need 'does this name exist' builtin,
and if we need new builtin, why don't implement all globbing in core.


[SVN r29163]
Vladimir Prus 21 лет назад
Родитель
Сommit
38f745b42f
1 измененных файлов с 1 добавлено и 1 удалено
  1. 1 1
      tools/build

+ 1 - 1
tools/build

@@ -1 +1 @@
-Subproject commit c6b899c0ea943822e4ed0cd7ba208369e5c20d45
+Subproject commit a9144a5ec35819ebacb3fb0dd21add9168fd337d

粤ICP备19079148号