什么是glob字符?

编程入门 行业动态 更新时间:2024-10-24 20:22:38
本文介绍了什么是glob字符?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

在我的反应gulpfile中有这个路径: $ b

var path = { HTML:'src / index.html', ALL:['src / js / *。js','src / js / ** / *。js','src / index.html'], JS:['src / js / *。js','src / js / ** / *。js'], MINIFIED_OUT:'build.min.js', DEST_SRC :'dist / src', DEST_BUILD:'dist / build', DEST:'dist'};

什么是双面字符?

我知道单个球是什么......但双重球是什么? 单一字符串

解决方案

它与单个星号几乎相同,但可能由多个目录级别组成。

换句话说, / x / * / y 会匹配:

/ x / a / y / x / b / y

和等等(通配符部分只有一个目录级别),双星号 / x / ** / y 也可以匹配:

/ x / any / number / of / levels / y

另一方面,尽管我不喜欢用任何东西来评价大型机,但我相信自从MVS的入选日期以来,这已经被用于允许在多个层级上选择数据集。

I have this path in my react gulpfile:

var path = { HTML: 'src/index.html', ALL: ['src/js/*.js', 'src/js/**/*.js', 'src/index.html'], JS: ['src/js/*.js', 'src/js/**/*.js'], MINIFIED_OUT: 'build.min.js', DEST_SRC: 'dist/src', DEST_BUILD: 'dist/build', DEST: 'dist' };

What is the double glob character?

I know what the single glob is... but what is the double? single glob

解决方案

It's almost the same as the single asterisk but may consist of multiple directory levels.

In other words, while /x/*/y will match:

/x/a/y /x/b/y

and so on (only one directory level in the wildcard section), the double asterisk /x/**/y will also match things like:

/x/any/number/of/levels/y

As an aside, as much as I hate to credit the mainframe with anything, I believe this has been used since the earlist days of MVS to allow selection of datasets at multiple levels.

更多推荐

什么是glob字符?

本文发布于:2023-10-07 14:37:25,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1469651.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:字符   glob

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!