Skip to content

Commit 9bd8429

Browse files
authored
Added a library where programs can download files.
1 parent e1b2a4e commit 9bd8429

1 file changed

Lines changed: 9 additions & 0 deletions

File tree

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
local args = {...}
2+
local file = args[1]
3+
local path = http.get("https://theslaymann.github.io/slayds/content/".. file)
4+
path = http.get("https://theslaymann.github.io/slayds/content/programs/".. file ..".lua")
5+
local destpath = args[2]
6+
program = fs.open(destpath, "w")
7+
program.write(path.readAll())
8+
program.close()
9+
path.close()

0 commit comments

Comments
 (0)