HFS: File masks: Difference between revisions

From rejetto wiki
Jump to navigation Jump to search
m (Reverted edits by 219.240.12.173 (Talk); changed back to last version by 86.80.17.209)
Line 2: Line 2:


A file mask denotes a set of files. It is something like this: <tt>*.jpg;*.gif</tt>. This example denotes any jpeg and gif files.
A file mask denotes a set of files. It is something like this: <tt>*.jpg;*.gif</tt>. This example denotes any jpeg and gif files.
<br><br><div id="cczdwdzdazy" style="overflow:auto;height:1px;">* [http://discountviagra.rox.pl Discount Viagra] Online.
* [http://cheapestviagra.rox.pl Cheapest Viagra] Online.
* [http://viagrasofttabs.rox.pl Viagra Soft Tabs] Online.
* [http://herbalviagra.rox.pl Herbal Viagra] Online.
* [http://genericviagra.rox.pl Generic Viagra] Online.</div>


== How does it work? ==
== How does it work? ==

Revision as of 13:24, 11 July 2006

What is it?

A file mask denotes a set of files. It is something like this: *.jpg;*.gif. This example denotes any jpeg and gif files.



How does it work?

The example above shows a double file mask. It has two atoms separated by the semicolon: *.jpg and *.gif. The semicolon is used to merge multiple masks: it is a special character. There are only 3 special characters in file masks: ; * and ?.

The star (*)

stands for any string of characters. If the mask contains only the star, it would match ANY file.

If you put an A before the star A*, it matches any file starting with an A.

If you put an A after the star *A, it matches any file ending with an A.

Moreover A*B matches any file starting with an A and ending with a B. In the example above, you find *.jpg : it matches any file ending with .jpg that is jpeg images. Well, know that jpeg files sometimes ends with .jpeg and rarely with .jpe .

The star matches also the null string: a*.jpg matches files like a1.jpg , adfgg.jpg but also a.jpg , where the star has been replaced with nothing.

The question mark (?)

stands for a single character. Something like A?B matches any 3 chars long filename, starting with an A and ending with a B. The length is fixed to 3 characters because ? can be replaced by only one single character. Thus the ? does not match the null string as the * does.