title: How can you check to see if a file exists (on the remote server) in Capistrano?
body: <p>Like many others I've seen in the Googleverse, I fell victim to the <code>File.exists?</code> trap, which of course checks your <em>local</em> file system, not the server you are deploying to.</p>
  
  <p>I found one result that used a shell hack like:</p>
  
  <pre><code>if [[ -d #{shared_path}/images ]]; then ...
  </code></pre>
  
  <p>but that doesn't sit well with me, unless it were wrapped nicely in a Ruby method.</p>
  
  <p>Has anybody solved this elegantly?</p>