Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Meaning of a double star (**) in a file path

I was reading here on Stack Overflow about ** in a path, as in this example:

src/js/**/*.js 

I would like to ask if " ** " means "any nested directory" please?!

like image 804
Arian1 Avatar asked Oct 03 '17 14:10

Arian1


People also ask

What do double asterisk wildcards mean?

Double Asterisk ( ** ) matches zero or more characters across multiple segments. It is used for globbing files that are in nested directories. Example: Tests/**/*.js.

What do dots mean in file path?

Relative paths make use of two special symbols, a dot (.) and a double-dot (..), which translate into the current directory and the parent directory. Double dots are used for moving up in the hierarchy. A single dot represents the current directory itself.

What does :/ mean in path?

.. is the container directory. So ../.. means "up" twice. For example if your current directory is C:/projects/a/b/c then ../.. will be C:/projects/a. Follow this answer to receive notifications.

What does a double star mean in mkyong?

The ** double star means any folders within the current folder, at any depth. The current folder is com/mkyong/, the ** means any folders at any depth, and the file name contains the pattern *Rule*. com/mkyong/a/anyRuleTest (matched) com/mkyong/a/b/anyRuleTest (matched) com/mkyong/a/b/c/anyRuleTest (matched) com/mkyong/y/z/anyRuleTest (matched)

What does ** (double star) and * (Star) do for parameters in Python?

What does ** (double star) and * (star) do for parameters in Python? In Python function, an argument with single asterisk (star) prefixed to it helps in receiving variable number of argument from calling environment

What does a double asterisk mean in a function?

In a function definition, the double asterisk is also known **kwargs. They used to pass a keyword, variable-length argument dictionary to a function. The two asterisks (**) are the important element here, as the word kwargs is conventionally used, though not enforced by the language.

How to file path with double slash in Java?

File Path with double slash in Java. The double slash in the file path is required as to create the ’’ character , another ‘’ needs to be added to escape it. Example. Output. Now let us understand the above program. The file path of the file is provided with double slash and then it is printed.


1 Answers

The double star in this case means all folders within the current folder, with the current folder being src/js

So in full, find all files with a .js extension, in all subfolders of src/js

like image 162
danwellman Avatar answered Sep 28 '22 08:09

danwellman