scoop:scoop.core:0.1.0
src/compiler/files.scoop
Selected production source · src/compiler/files.scoop
1
package scoop.compiler3
import String4
import Array5
import Byte7
/**8
* Embeds the exact UTF-8 contents of a file inside the defining Cone.9
* The constant path is relative to this call's source directory. Both the10
* path and its resolved symlink target must stay inside the Cone directory.11
* Invalid UTF-8 is a compile error; BOM and line endings are preserved.12
* The file is read at compile time. This intrinsic has no function reference.13
*/14
@Intrinsic("include_str")15
public fun includeStr(path: String): String17
/**18
* Embeds the exact bytes of a file as an immutable Array<Byte>.19
* The constant path is relative to this call's source directory. Both the20
* path and its resolved symlink target must stay inside the Cone directory.21
* The file is read at compile time. This intrinsic has no function reference.22
*/23
@Intrinsic("include_bytes")24
public fun includeBytes(path: String): Array<Byte>