(path, statMethod)
| 141 | } |
| 142 | |
| 143 | function statOrNull(path, statMethod) { |
| 144 | try { |
| 145 | var stat = fs.statSync(path); |
| 146 | } catch (e) { |
| 147 | if (e.code !== "ENOENT") { |
| 148 | throw e; |
| 149 | } |
| 150 | } |
| 151 | |
| 152 | if (stat) { |
| 153 | if (typeof statMethod === "string") { |
| 154 | if (stat[statMethod]()) { |
| 155 | return stat; |
| 156 | } |
| 157 | } else { |
| 158 | return stat; |
| 159 | } |
| 160 | } |
| 161 | |
| 162 | return null; |
| 163 | } |
| 164 | |
| 165 | function find(dir, predicate) { |
| 166 | var joinArgs = Array.prototype.slice.call(arguments, 2); |
no outgoing calls
no test coverage detected
searching dependent graphs…