Sir_Mr_Bman

Untitled

May 3rd, 2014
261
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.66 KB | None | 0 0
  1. --[[
  2.  
  3. diskMngr - A Disk Utility for Computer Craft
  4.  
  5. Written by Sir_Mr_Bman
  6.  
  7. === THIS IS THE PUBLIC RELEASE OF THIS PROGRAM ===
  8. Please understand that this is the PUBLIC RELEASE of the Disk Utility.
  9. Not all features may function to everyones EXACT needs!
  10. I've tried to make this work in as many situations as possible, including:
  11.  
  12. - A GUI for both Advanced computers.
  13. - CommandLine tool for both Basic and Advanced computers.
  14.  
  15. -- WHAT DOES IT DO --
  16. diskMngr is designed to clear disks in computercraft.
  17. This utility is extremely powerful - it is designed to wipe the entire computer.
  18.  
  19. ++ Modes ++
  20. + Format (Floppy) - designed to wipe FLOPPY DISKS of all information.
  21. + Backup (Floppy) - creates a packed tar.gz file of all the information from the disk.
  22. + Restore (Floppy) - restores disks from packed tar.gz files.
  23.  
  24. = Wipe (From USR) - designed to clear ALL USER FILES except the diskMngr file.
  25. = Backup (From USR) - creates a packed tar.gz file of all the user information.
  26. = Restore (From USR) - restores drive from packed tar.gz files.
  27.  
  28. = Wipe (From ROM) - designed to clear ALL USER FILES.
  29.  
  30.  
  31. ++ Warnings ++
  32.  
  33. + Wipe (Floppy) - You will lose ALL data on the disk.
  34. + Backup (Floppy) - [1] Some data may be lost.
  35. [2] Any viruses on the disk will be backed up.
  36. + Restore (Floppy) - [1] Can only restore if USER has backed up disk MANUALLY
  37. [2] RESTORE will remove ALL data from the disk it is restoring.
  38.  
  39. = Wipe (From USR) - [1] You will lose ALL user data.
  40. [2] The diskMngr file WILL REMAIN ON THE DISK!
  41. If this file is corrupted, it will remain that way.
  42. = Backup (From USR) - [1] Some data may be lost.
  43. [2] Any viruses on the disk will be backed up.
  44. = Restore (From USR) - [1] Can only restore if USER has backed up drive MANUALLY
  45. [2] RESTORE will REMOVE ALL DATA from the disk it is restoring.
  46. = Wipe (From ROM) - [1] You will lose ALL USER DATA.
  47. [2] This method requires ADVANCED INSTALL! Please see install directions
  48. for more information.
  49.  
  50.  
  51. === CREDITS ===
  52.  
  53. - Software designed by Sir_Mr_Bman
  54. - Software created by Sir_Mr_Bman and Pitchfork - SOFTWARE
  55. - Bug tested by Sir_Mr_Bman and blackbanshee18
  56.  
  57. - THIS SOFTWARE USES API'S AND OTHER SOFTWARE NOT BY ME:
  58. - CCTar by:
  59. ]]
  60.  
  61. --[[ Functions for all diskMngr modes ]]
  62. -- These functions are designed with cmdLn in mind.
  63.  
  64. -- CommandLine Args
  65. local tArgs = { ... }
  66. local command = tArgs[1]
  67.  
  68. local function cmdLnUsage()
  69. print("Invalid Command Usage.")
  70. print("Please type \"<filename> help\" for help.")
  71. end
  72.  
  73. local colorGUI()
  74. while true do
  75. term.setTextColor(colors.yellow)
  76. term.setBackgroundColor(colors.black)
  77. term.clear()
  78. term.setCursorPos(1, 1)
  79. term.setBackgroundColor(colors.gray)
  80. term.clearLine()
  81. print("diskMngr")
  82. term.setBackgroundColor(colors.black)
  83. print("")
  84. print("")
  85.  
  86. end
  87. end
  88.  
  89. local function wipeF(output)
  90.  
  91.  
  92. end
  93.  
  94. local function backupF(output)
  95.  
  96.  
  97. end
  98.  
  99. local function restoreF(output)
  100.  
  101.  
  102. end
  103.  
  104. local function wipeUsr(output)
  105.  
  106.  
  107. end
  108.  
  109. local function backupUsr(output)
  110.  
  111.  
  112. end
  113.  
  114. local function restoreUsr(output)
  115.  
  116.  
  117. end
  118.  
  119. local function wipeRom(output)
  120.  
  121.  
  122. end
  123.  
  124. -- Start main code
  125.  
  126. if term.isColor() then
  127. if #tArgs < 1 then
  128. colorGUI()
  129. else
  130. cmdLn()
  131. end
  132. else
  133. cmdLn()
  134. end
Advertisement
Add Comment
Please, Sign In to add comment