Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --[[
- diskMngr - A Disk Utility for Computer Craft
- Written by Sir_Mr_Bman
- === THIS IS THE PUBLIC RELEASE OF THIS PROGRAM ===
- Please understand that this is the PUBLIC RELEASE of the Disk Utility.
- Not all features may function to everyones EXACT needs!
- I've tried to make this work in as many situations as possible, including:
- - A GUI for both Advanced computers.
- - CommandLine tool for both Basic and Advanced computers.
- -- WHAT DOES IT DO --
- diskMngr is designed to clear disks in computercraft.
- This utility is extremely powerful - it is designed to wipe the entire computer.
- ++ Modes ++
- + Format (Floppy) - designed to wipe FLOPPY DISKS of all information.
- + Backup (Floppy) - creates a packed tar.gz file of all the information from the disk.
- + Restore (Floppy) - restores disks from packed tar.gz files.
- = Wipe (From USR) - designed to clear ALL USER FILES except the diskMngr file.
- = Backup (From USR) - creates a packed tar.gz file of all the user information.
- = Restore (From USR) - restores drive from packed tar.gz files.
- = Wipe (From ROM) - designed to clear ALL USER FILES.
- ++ Warnings ++
- + Wipe (Floppy) - You will lose ALL data on the disk.
- + Backup (Floppy) - [1] Some data may be lost.
- [2] Any viruses on the disk will be backed up.
- + Restore (Floppy) - [1] Can only restore if USER has backed up disk MANUALLY
- [2] RESTORE will remove ALL data from the disk it is restoring.
- = Wipe (From USR) - [1] You will lose ALL user data.
- [2] The diskMngr file WILL REMAIN ON THE DISK!
- If this file is corrupted, it will remain that way.
- = Backup (From USR) - [1] Some data may be lost.
- [2] Any viruses on the disk will be backed up.
- = Restore (From USR) - [1] Can only restore if USER has backed up drive MANUALLY
- [2] RESTORE will REMOVE ALL DATA from the disk it is restoring.
- = Wipe (From ROM) - [1] You will lose ALL USER DATA.
- [2] This method requires ADVANCED INSTALL! Please see install directions
- for more information.
- === CREDITS ===
- - Software designed by Sir_Mr_Bman
- - Software created by Sir_Mr_Bman and Pitchfork - SOFTWARE
- - Bug tested by Sir_Mr_Bman and blackbanshee18
- - THIS SOFTWARE USES API'S AND OTHER SOFTWARE NOT BY ME:
- - CCTar by:
- ]]
- --[[ Functions for all diskMngr modes ]]
- -- These functions are designed with cmdLn in mind.
- -- CommandLine Args
- local tArgs = { ... }
- local command = tArgs[1]
- local function cmdLnUsage()
- print("Invalid Command Usage.")
- print("Please type \"<filename> help\" for help.")
- end
- local colorGUI()
- while true do
- term.setTextColor(colors.yellow)
- term.setBackgroundColor(colors.black)
- term.clear()
- term.setCursorPos(1, 1)
- term.setBackgroundColor(colors.gray)
- term.clearLine()
- print("diskMngr")
- term.setBackgroundColor(colors.black)
- print("")
- print("")
- end
- end
- local function wipeF(output)
- end
- local function backupF(output)
- end
- local function restoreF(output)
- end
- local function wipeUsr(output)
- end
- local function backupUsr(output)
- end
- local function restoreUsr(output)
- end
- local function wipeRom(output)
- end
- -- Start main code
- if term.isColor() then
- if #tArgs < 1 then
- colorGUI()
- else
- cmdLn()
- end
- else
- cmdLn()
- end
Advertisement
Add Comment
Please, Sign In to add comment