object Includer
Companion object for the Includer class. Also contains some
utility methods, such as the preprocess() method.
- Alphabetic
- By Inheritance
- Includer
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Value Members
- final def !=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def ##(): Int
- Definition Classes
- AnyRef → Any
- final def ==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- val DefaultIncludeRegex: Regex
The default regular expression for matching include directives.
- val DefaultMaxNesting: Int
The default maximum nesting level for includes.
- def apply(pathOrURI: String, includeRegex: Regex, maxNesting: Int): Try[Includer]
Create an includer.
Create an includer.
- pathOrURI
the path or URI string to read
- includeRegex
the regular expression that defines an include directive. Must contain a group that surrounds the file or URL part.
- maxNesting
the maximum nesting level
- returns
Success(Includer)orFailure(Exception)
- def apply(pathOrURI: String): Try[Includer]
Create an includer from a path, using the default values for the
maxNestingandincludeRegexparameters.Create an includer from a path, using the default values for the
maxNestingandincludeRegexparameters.- pathOrURI
the path or URI string to read
- def apply(path: String, maxNesting: Int): Try[Includer]
Create an includer from a path, using the default value for the
includeRegexparameter.Create an includer from a path, using the default value for the
includeRegexparameter.- path
the path or URI string to read
- maxNesting
the maximum nesting level
- returns
Success(Includer)orFailure(Exception)
- def apply(pathOrURI: String, includeRegex: Regex): Try[Includer]
Create an includer, using the default value for the
maxNestingparameter.Create an includer, using the default value for the
maxNestingparameter.- pathOrURI
the path or URI string to read
- includeRegex
the regular expression that defines an include directive. Must contain a group that surrounds the file or URL part.
- returns
Success(Includer)orFailure(Exception)
- def apply(source: Source): Try[Includer]
Create an includer from a
scala.io.Source, using the default values for themaxNestingandincludeRegexparameters.Create an includer from a
scala.io.Source, using the default values for themaxNestingandincludeRegexparameters.WARNING: When you read from a
Source,Includerhas no reliable way to determine the base URI or file, so all include references must be absolute. Relative includes may be supported, depending on what theSourceis (file, URL, etc.), but you shouldn't count on it.- source
the
Sourceto read- returns
Success(Includer)orFailure(Exception)
- def apply(source: Source, includeRegex: Regex): Try[Includer]
Create an includer from a
scala.io.Source, using the default value for themaxNestingparameter.Create an includer from a
scala.io.Source, using the default value for themaxNestingparameter.WARNING: When you read from a
Source,Includerhas no reliable way to determine the base URI or file, so all include references must be absolute. Relative includes may be supported, depending on what theSourceis (file, URL, etc.), but you shouldn't count on it.- source
the
Sourceto read- includeRegex
the regular expression that defines an include directive. Must contain a group that surrounds the file or URL part.
- returns
Success(Includer)orFailure(Exception)
- def apply(source: Source, maxNesting: Int): Try[Includer]
Create an includer from a
scala.io.Source, using the default value for theincludeRegexparameter.Create an includer from a
scala.io.Source, using the default value for theincludeRegexparameter.WARNING: When you read from a
Source,Includerhas no reliable way to determine the base URI or file, so all include references must be absolute. Relative includes may be supported, depending on what theSourceis (file, URL, etc.), but you shouldn't count on it.- source
the
Sourceto read- maxNesting
the maximum nesting level
- returns
Success(Includer)orFailure(Exception)
- def apply(source: Source, includeRegex: Regex, maxNesting: Int): Try[Includer]
Create an includer from a
scala.io.Source.Create an includer from a
scala.io.Source.WARNING: When you read from a
Source,Includerhas no reliable way to determine the base URI or file, so all include references must be absolute. Relative includes may be supported, depending on what theSourceis (file, URL, etc.), but you shouldn't count on it.- source
the
Sourceto read- includeRegex
the regular expression that defines an include directive. Must contain a group that surrounds the file or URL part.
- maxNesting
the maximum nesting level
- returns
Success(Includer)orFailure(Exception)
- def apply(file: File, includeRegex: Regex, maxNesting: Int): Try[Includer]
Create an includer from a
java.io.File.Create an includer from a
java.io.File.- file
the
Filefrom which to read- includeRegex
the regular expression that defines an include directive. Must contain a group that surrounds the file or URL part.
- maxNesting
the maximum nesting level
- returns
Success(Includer)orFailure(Exception)
- def apply(file: File, maxNesting: Int): Try[Includer]
Create an includer from a
java.io.File, using the default value for theincludeRegexparameter.Create an includer from a
java.io.File, using the default value for theincludeRegexparameter.- file
the
Fileto read- maxNesting
the maximum nesting level
- returns
Success(Includer)orFailure(Exception)
- def apply(file: File, includeRegex: Regex): Try[Includer]
Create an includer from a
java.io.File, using the default value for themaxNestingparameter.Create an includer from a
java.io.File, using the default value for themaxNestingparameter.- file
the
Filefrom which to read- includeRegex
the regular expression that defines an include directive. Must contain a group that surrounds the file or URL part.
- returns
Success(Includer)orFailure(Exception)
- def apply(file: File): Try[Includer]
Create an includer from a
java.io.File, using the default values for themaxNestingandincludeRegexparameters.Create an includer from a
java.io.File, using the default values for themaxNestingandincludeRegexparameters.- file
the
Filefrom which to read- returns
Success(Includer)orFailure(Exception)
- final def asInstanceOf[T0]: T0
- Definition Classes
- Any
- def clone(): AnyRef
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.CloneNotSupportedException]) @native()
- final def eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def equals(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef → Any
- def finalize(): Unit
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.Throwable])
- final def getClass(): Class[_ <: AnyRef]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- def hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- final def ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- final def notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- final def notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- def preprocess(pathOrURI: String, tempPrefix: String, tempSuffix: String): Try[String]
Process all include directives in the specified file, returning a path to a temporary file that contains the results of the expansion.
Process all include directives in the specified file, returning a path to a temporary file that contains the results of the expansion. The temporary file is automatically removed when the program exits, though the caller is free to remove it whenever it is no longer needed.
- pathOrURI
the path or URI string to read
- tempPrefix
temporary file prefix, with the same meaning as the temporary file prefix used by
java.io.File.createTempFile()- tempSuffix
temporary file suffix, with the same meaning as the temporary file suffix used by
java.io.File.createTempFile()- returns
Success(path)wherepathis the path to the temporary file, orFailure(exception)
- final def synchronized[T0](arg0: => T0): T0
- Definition Classes
- AnyRef
- def toString(): String
- Definition Classes
- AnyRef → Any
- final def wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException]) @native()