title: Can't test if directory already exists from within Fastlane with Ruby
body: <p>I can’t test whether a directory exists from within a Fastlane action nor lane. None of the following work for <code>save_path = "./dir_name"</code> nor <code>save_path = "dir_name"</code> in the current directory (from which <code>fastlane</code> is being run):</p>
  
  <pre><code>!Dir.empty?(save_path)
  !Dir[save_path].empty?
  Dir.exist?(save_path)
  File.exist?(save_path)
  File.directory?(save_path)
  </code></pre>
  
  <p>I even tried to expand the relative path:</p>
  
  <p><code>File.exists? File.expand_path(save_path)</code></p>
  
  <p>I have referred to the following:</p>
  
  <ol>
  <li><a href="https://stackoverflow.com/questions/5059156/check-if-directory-is-empty-in-ruby">Check if directory is empty in Ruby</a></li>
  <li><a href="https://stackoverflow.com/questions/1085218/how-to-check-if-a-given-directory-exists-in-ruby">How to check if a given directory exists in Ruby</a></li>
  <li><a href="https://blog.bigbinary.com/2017/02/28/dir-emtpy-included-in-ruby-2-4.html" rel="nofollow noreferrer">https://blog.bigbinary.com/2017/02/28/dir-emtpy-included-in-ruby-2-4.html</a></li>
  <li><a href="https://ruby-doc.org/core-2.2.0/Dir.html" rel="nofollow noreferrer">https://ruby-doc.org/core-2.2.0/Dir.html</a></li>
  </ol>
  
  <p>How does one test to see if a directory exists from within Fastlane? Thank you for reading and for your help!</p>