replicator/lib/ruby/pg-wal-plugin.rb
def read_status_file(file)
    if File.exists?(file)
      contents = "UNKNOWN"
      File.open(file, "r") { | input |
        contents = input.gets()
      }
      if contents == nil
        return "UNKNOWN"
      else
        return contents
      end
    else
      return "UNKNOWN"
    end
  end
# Read the value of a 1-line status file or return UNKNOWN if file 
# cannot be read. 
Read the value of a 1-line status file or return UNKNOWN if file
cannot be read.
Read the value of a 1 - line status file or return UNKNOWN if file cannot be read .
def read_status_file(file)
    if File.exists?(file)
      contents = "UNKNOWN"
      File.open(file, "r") { | input |
        contents = input.gets()
      }
      if contents == nil
        return "UNKNOWN"
      else
        return contents
      end
    else
      return "UNKNOWN"
    end
  end
def read_status_file ( file ) if File . exists? ( file ) contents = "UNKNOWN" File . open ( file , "r" ) { | input | contents = input . gets ( ) } if contents == nil return "UNKNOWN" else return contents end else return "UNKNOWN" end end
Read the value of a 1-line status file or return UNKNOWN if file
cannot be read.
Read the value of a 1 - line status file or return UNKNOWN if file cannot be read .
file