1
2
3
4
5
6
7
8
9
10
11 container resources [
12 lock:bool
13 data:&:@:resource
14 ]
15
16 container resource [
17 name:text
18 contents:text
19 ]
20
21 def start-reading resources:&:resources, filename:text -> contents:&:source:char, error?:bool [
22 local-scope
23 load-inputs
24 error? <- copy false
25 {
26 break-unless resources
27
28 contents, error? <- start-reading-from-fake-resource resources, filename
29 return
30 }
31
32 file:num <- $open-file-for-reading filename
33 return-unless file, null/no-contents, true/error
34 contents:&:source:char, sink:&:sink:char <- new-channel 30
35 start-running receive-from-file file,