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 :).
On Wed, Feb 1, 2017 at 10:34 AM, Roman Pastushkov via swift-dev < swift-dev@swift.org> wrote: > Hello everyone! > > I iam trying compile 4 lines prog on linux: > import Foundation > let filemgr = FileManager.default > let path = filemgr.currentDirectoryPath() > print(path) > > and get erorr /main.swift:3:40: error: cannot call value of non-function > type 'String' > let path = filemgr.currentDirectoryPath() > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~ > > <unknown>:0: error: build had 1 command failures > > > > why? > Roman Pastushkov > xnucleargemi...@aol.com > > _______________________________________________ > swift-dev mailing list > swift-dev@swift.org > https://lists.swift.org/mailman/listinfo/swift-dev > > -- Chris Eidhof
_______________________________________________ swift-dev mailing list swift-dev@swift.org https://lists.swift.org/mailman/listinfo/swift-dev