Advertisement
Guest User

Untitled

a guest
Feb 13th, 2015
218
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.77 KB | None | 0 0
  1. local fs = require("filesystem")
  2. local term = require("term")
  3.  
  4. if not term.isAvailable() then
  5.   return
  6. end
  7.  
  8. local version = 0
  9.  
  10. local cureentTabe = "null"
  11.  
  12. local tabs = {}
  13.  
  14. local packages = {}
  15.  
  16. function loadPackages()
  17.   if(not fs.exists("/etc/blockio/")) then
  18.     fs.makeDirectory("/etc/blockio/")
  19.   end
  20.   packageFiles = fs.list("/etc/blockio/")
  21.   for packageFile in packageFiles do
  22.     print(packageFile)
  23.     local path,name,extension = string.match(packageFile, "(.-)([^/]-([^/%.]+))$")
  24.     name = string.gsub(name,".lua","")
  25.     print(name)
  26.     print(extension)
  27.     if(extension == "lua") then
  28.       packages[name] = require("/etc/blockio/"..name)
  29.     end
  30.     for index,value in ipairs(t) do
  31.       print(index)
  32.     end
  33.  
  34.   end
  35.  
  36. end
  37.  
  38. loadPackages()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement