Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local tArg = {...}
- --Download Manager
- --this program takes download info, downloads, and updates the System Download List
- local Item = tArg[1]
- local Type = tArg[4]
- local Code = tArg[3]
- local DestinationFile = tArg[2]
- local PrintOutput = tArg[5]
- if PrintOutput == true then
- print(tArg[1])
- print(tArg[2])
- print(tArg[3])
- print(tArg[4])
- end
- local Text = nil
- function AddToFile(Des)
- local File = fs.open(Des,"a")
- File.writeLine(Item)
- File.close()
- end
- if fs.exists("ApertureOS_Programs") == false then
- local Pro = fs.open("/OS/System/Files/ApertureOS_Programs","w")
- Pro.close()
- end
- if fs.exists("ApertureOS_Files") == false then
- local Pro = fs.open("/OS/System/Files/ApertureOS_Files","w")
- Pro.close()
- end
- if fs.exists("ApertureDL_Programs") == false then
- local Pro = fs.open("/OS/System/Files/ApertureDL_Programs","w")
- Pro.close()
- end
- if fs.exists("ApertureDL_Downloads") == false then
- local Pro = fs.open("/OS/System/Files/ApertureDL_Downloads","w")
- Pro.close()
- end
- if Type == "OS" then
- AddToFile("ApertureOS_Programs")
- end
- if Type == "File" then
- AddToFile("ApertureOS_Files")
- end
- if Type == "Addon" then
- AddToFile("ApertureDL_Programs")
- end
- if Type == "Public" then
- AddToFile("ApertureDL_Downloads")
- end
- local Send = fs.combine("OS/System",DestinationFile,Item)
- if Code == "n" then
- fs.move(Item,Send)
- else
- shell.run("C_Pastebin","get",Code,Send)
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement