title: How to include spaces in filenames in Gradle
body: <p>I have a line like this</p>
  
  <pre><code>file("c:/Program Files")
  </code></pre>
  
  <p>and I get the error</p>
  
  <pre><code>&gt; java.net.URISyntaxException: Illegal character in path at index 10: c:/Program Files
  </code></pre>
  
  <p>How do I include spaces in file names?</p>
  
  <p><strong>UPDATE</strong></p>
  
  <p>Here's the precise error and Gradle code.</p>
  
  <p>Error:</p>
  
  <pre><code>* Where:
  Script '.../gradle/tsp.gradle' line: 9
  
  * What went wrong:
  A problem occurred evaluating script.
  &gt; java.net.URISyntaxException: Illegal character in path at index 10: c:/Program Files
  </code></pre>
  
  <p>Code (the last line in this code is line 9, the remainder of the code is omitted):</p>
  
  <pre><code>/*
   * Code for Tom Sawyer Perspectives automation.
   */
  
  
  project.ext {
      tspSearchPath = files(
          // For some Windows boxes, users may use this dir
          file("c:/Program Files"),
  </code></pre>
  
  <p>To be clear, I don't get the error when I run Gradle on Windows.  I get the error when I run Gradle on Mac.  I have a list of paths to search for all platforms and don't want to change the list on a per platform basis (although this is probably what I will do in the future after I learn more Gradle and Groovy).</p>
  
  <p>However, there error is at the space and Mac supports spaces in file names.  Does Gradle's file method support spaces on Mac?  It does on Windows.  If it does on Mac, how do I include spaces in filenames?</p>