PlatformContext
This trait allows RIDDL to abstract away its IO operations. Several places in RIDDL declare a using
clause with this trait in order to allow RIDDL to invoke synchronous and asynchronous I/O operations. This allows RIDDL's pure-scala implementation to be used with: JVM, scala-native, scala-js for Browser, scala-js for Node, or any other environment that supports simple input/output operations on files.
Attributes
- Source
- PlatformContext.scala
- Graph
-
- Supertypes
-
class Objecttrait Matchableclass Any
- Known subtypes
-
class JVMPlatformContext
Members list
Value members
Abstract methods
The ExecutionContext that will be used for Futures and Promises
The ExecutionContext that will be used for Futures and Promises
Attributes
- Source
- PlatformContext.scala
Load the content of a text file asynchronously and return it as a string.
Load the content of a text file asynchronously and return it as a string. THe content, typically a RIDDL or Markdown file, is expected to be encoded in UTF-8
Value parameters
- url
-
The URL to specify the file to load. This should specify the
file://
protocol.
Attributes
- Returns
-
The content of the file as a String, asynchronously in a Future
- Source
- PlatformContext.scala
The newline character for this platform
Read the entire contents of a file and return it, synchronously
Read the entire contents of a file and return it, synchronously
Value parameters
- file
-
The file to read.
Attributes
- Returns
- Source
- PlatformContext.scala
Write a message to the standard output or equivalent for this platform
Write a message to the standard output or equivalent for this platform
Value parameters
- message
-
The message to write to the standard output
Attributes
- Source
- PlatformContext.scala
Write a newline appended message to the stnadard output or equivalent for this platform
Write a newline appended message to the stnadard output or equivalent for this platform
Value parameters
- message
-
The message to write to the standard output
Attributes
- Source
- PlatformContext.scala
Concrete methods
Attributes
- Source
- PlatformContext.scala
The public accessor to get the current options
Attributes
- Source
- PlatformContext.scala
Do a task with a different set of options and then return to what they were
Do a task with a different set of options and then return to what they were
Attributes
- Source
- PlatformContext.scala
Concrete fields
The Logger instance to use on this platform.
The default CommonOptions to use on this platform but not publicly available
The default CommonOptions to use on this platform but not publicly available
Attributes
- Source
- PlatformContext.scala
Givens
Givens
Attributes
- Source
- PlatformContext.scala