title: Locate source project directory in Swift from compiled code
body: <p>I want to find the directory of my uncompiled source code (because I want to count the lines of it) in my own swift project.</p>
  
  <pre><code>let projectRepo = "/Users/tombrown/Workspace/SwiftGolf" // &lt;-- I want this programmatically
  let path = "\(projectRepo)/SwiftGolf/Golf.swift"
  
  var fileContents = String.stringWithContentsOfFile(path, encoding: NSUTF8StringEncoding, error: nil)
  </code></pre>
  
  <p>I've found the compiled location with <code>NSBundle.mainBundle().bundlePath</code>, but it doesn't contain the uncompiled code. Any thoughts? Maybe there's a way that I could write a temporary file during the build process?</p>