This adds a readfile function to actually access files from our deploy. A fun side effect is that we can even access our own code! In general, it's a good reminder that you should only run trusted code on your own infrastructure. This also includes a fancy new test case.
7 lines
140 B
Plaintext
7 lines
140 B
Plaintext
import "deploy"
|
|
|
|
# relative paths for us
|
|
$f = "/files/file2" # real file is here as well
|
|
$f2 = deploy.abspath($f)
|
|
$x2 = deploy.readfile($f)
|