activesupport/lib/active_support/cache/file_store.rb
# Delete empty directories in the cache.
Delete empty directories in the cache.
Delete empty directories in the cache .
def delete_empty_directories(dir)
          return if File.realpath(dir) == File.realpath(cache_path)
          if Dir.entries(dir).reject {|f| EXCLUDED_DIRS.include?(f)}.empty?
            Dir.delete(dir) rescue nil
            delete_empty_directories(File.dirname(dir))
          end
        end
def delete_empty_directories ( dir ) return if File . realpath ( dir ) == File . realpath ( cache_path ) if Dir . entries ( dir ) . reject { | f | EXCLUDED_DIRS . include? ( f ) } . empty? Dir . delete ( dir ) rescue nil delete_empty_directories ( File . dirname ( dir ) ) end end
Delete empty directories in the cache.
Delete empty directories in the cache .
dir
<not_specific>