added system.slurp for easy embedding of resources
This commit is contained in:
parent
7000cf51b7
commit
72e7a98543
10 changed files with 63 additions and 24 deletions
|
|
@ -1974,4 +1974,10 @@ proc getTypeInfo*[T](x: T): pointer {.magic: "GetTypeInfo".}
|
|||
## get type information for `x`. Ordinary code should not use this, but
|
||||
## the `typeinfo` module instead.
|
||||
|
||||
proc slurp*(filename: string): string {.magic: "Slurp".}
|
||||
## compiletime ``readFile`` proc for easy `resource`:idx: embedding:
|
||||
## .. code-block:: nimrod
|
||||
##
|
||||
## const myResource = slurp"mydatafile.bin"
|
||||
##
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue