IMO you should add `hasPath()` as you already have `hasFile()` method, or at least use variable here to avoid twice `get*` call (same below).