def getPropertiesFrom()

in src/main/scala/com.gu.conf/impl/PropertiesLoader.scala [46:68]


  def getPropertiesFrom(descriptor: String): Properties = {
    val properties = new Properties
    var inputStream: Option[InputStream] = None

    try {
      val file = Option(vfs resolveFile descriptor) filter { _.exists }
      if (!file.isDefined) {
        LOG.info("Ignoring missing configuration " + descriptor)
      }

      inputStream = file map { _.getContent.getInputStream }

      inputStream foreach { properties.load }

    } catch {
      case ioe: IOException =>
        LOG.warn("Unexpected error reading from " + descriptor, ioe)
    } finally {
      inputStream foreach { IOUtils.closeQuietly }
    }

    properties
  }