1---
2id: expr.name
3title: name & iname
4layout: docs
5section: Expression Terms
6permalink: docs/expr/name.html
7---
8
9The `name` expression performs exact matches against file names.  By default it
10is scoped to the basename of the file:
11
12    ["name", "Makefile"]
13
14You may specify multiple names to match against by setting the second argument
15to an array:
16
17    ["name", ["foo.txt", "Makefile"]]
18
19This second form can be accelerated and is preferred over an `anyof`
20construction.
21
22You may change the scope of the match via the optional third argument:
23
24    ["name", "path/to/file.txt", "wholename"]
25    ["name", ["path/to/one", "path/to/two"], "wholename"]
26
27Finally, you may specify case insensitive evaluation by using `iname` instead
28of `name`.
29
30Starting in version 2.9.9, on OS X systems where the watched root is a case
31insensitive filesystem (this is the common case for OS X), `name` is equivalent
32to `iname`.
33