PathKit icon indicating copy to clipboard operation
PathKit copied to clipboard

PathKit method calls

Open liquidoshin opened this issue 3 years ago • 1 comments

This is more of a question than an issue. In your README documentation, whenever a PathKit method is called such as path.exists() it uses the () at the end as seems normal. But when I do it in the Xcode IDE, it doesn't like the () at the end. I have a check in my code: if path.exists { .... } And that runs fine but with the parens: if path.exists() { ... }

it gives me a build error. Any idea why this is the case? It's not a big deal as I've figured how to make it work. Just curious as to whether I'm doing something wrong implementing PathKit.

liquidoshin avatar May 02 '22 18:05 liquidoshin

It appears to be a case of the readme being out of date compared to the implementation. At somepoint we made those computed properties instead of functions.

Although, in retrospect I am not sure it was a good idea, but here we are today. They are computed.

kylef avatar May 03 '22 22:05 kylef