ResourceLoader

Internal utility for loading text resources from the file system, the classpath or via its URL.

class Object
trait Matchable
class Any

Value members

Concrete methods

def loadClasspathResource[F[_]](resource: String)(implicit evidence$3: Sync[F]): F[Option[Either[ConfigResourceError, String]]]

Load the specified classpath resource.

Load the specified classpath resource.

The resource name is interpreted as absolute and should not start with a leading /.

If the resource does not exist the result will be None. If it does exist, but fails to load or parse correctly the result will be Some(Left(...)), successfully parsed resources will be returned as Some(Right(...)).

def loadFile[F[_]](file: String)(implicit evidence$1: Sync[F]): F[Option[Either[ConfigResourceError, String]]]

Load the file with the specified name.

Load the file with the specified name.

If the file does not exist the result will be None. If it does exist, but fails to load or parse correctly the result will be Some(Left(...)), successfully parsed resources will be returned as Some(Right(...)).

def loadFile[F[_]](file: File)(implicit evidence$2: Sync[F]): F[Option[Either[ConfigResourceError, String]]]

Load the specified file (which may be a file on the file system or a classpath resource).

Load the specified file (which may be a file on the file system or a classpath resource).

If the file does not exist the result will be None. If it does exist, but fails to load or parse correctly the result will be Some(Left(...)), successfully parsed resources will be returned as Some(Right(...)).

def loadUrl[F[_]](url: URL)(implicit evidence$4: Sync[F]): F[Option[Either[ConfigResourceError, String]]]

Load the configuration from the specified URL.

Load the configuration from the specified URL.

If the resource does not exist (404 response) the result will be None. If it does exist, but fails to load or parse correctly the result will be Some(Left(...)), successfully parsed resources will be returned as Some(Right(...)).