Documentation discrepancy present in 10.3 and fixed in 10.4.1
According to the documentation for FileNames under Details:
![FileNames[forms,dirs,{n}] includes names of directories only if they appear exactly at level n.](../../images/3c77c740cfe35d339b441a3492bf4290.webp)
However when I attempt to use this syntax I get an error:
FileNames["foo*", "c:\\", {2}]
FileNames::innf: Non-negative integer or Infinity expected at position 3 in FileNames[foo*,c:\,{2}]. >>
I am using Mathematica 10.0.1 under Windows. Does this syntax work on other systems?
FileNames["foo*", "/", {2}]) Also in MMA 9.0.1.0 Documentation, the curly brackets are missing :{}) is also a documented syntax meaning down to level n, and yes it does seem to work. The syntax in the question is supposed to mean "exactly at level n" as it says. – Mr.Wizard Sep 24 '14 at 13:41?? FileNamesalso knows nothing about{n}. – Jinxed Feb 22 '15 at 09:42{n}form.. – george2079 Jul 23 '15 at 19:15