<div dir="ltr">The error tells you it's not a function, but a String. In other words, it's a property of filemgr. Try calling it without the parentheses :).</div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Feb 1, 2017 at 10:34 AM, Roman Pastushkov via swift-dev <span dir="ltr"><<a href="mailto:swift-dev@swift.org" target="_blank">swift-dev@swift.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><font color="black" size="2" face="arial"><font face="arial"><span style="font-size:10pt">Hello everyone!</span></font><br>
<br>
<font face="arial"><span style="font-size:10pt">I iam trying compile 4 lines prog on linux:</span></font><br>
<div><font face="arial">import Foundation</font></div>
<div><font face="arial">let filemgr = FileManager.default</font></div>
<div><font face="arial">let path = filemgr.currentDirectoryPath()</font></div>
<div><font face="arial">print(path)</font></div>
<div style="color:black;font-family:arial;font-size:10pt"><br>
</div>
and get erorr /main.swift:3:40: error: cannot call value of non-function type 'String'
<div>let path = filemgr.currentDirectoryPath()</div>
<div> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~^<wbr>~</div>
<div> </div>
<div><unknown>:0: error: build had 1 command failures</div>
<div><br>
</div>
<div><br>
</div>
<div><br>
</div>
<div>why?</div>
<div style="color:black;font-family:arial;font-size:10pt;clear:both">Roman Pastushkov<br>
<a href="mailto:xnucleargeminix@aol.com" target="_blank">xnucleargeminix@aol.com</a><br>
</div>
</font><br>______________________________<wbr>_________________<br>
swift-dev mailing list<br>
<a href="mailto:swift-dev@swift.org">swift-dev@swift.org</a><br>
<a href="https://lists.swift.org/mailman/listinfo/swift-dev" rel="noreferrer" target="_blank">https://lists.swift.org/<wbr>mailman/listinfo/swift-dev</a><br>
<br></blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature" data-smartmail="gmail_signature">Chris Eidhof</div>
</div>