Compare commits
2 Commits
0ac4923568
...
39ea9c1a18
Author | SHA1 | Date | |
---|---|---|---|
39ea9c1a18 | |||
4d0ce1e06d |
@ -20,7 +20,7 @@ function netutil.exportfs(path)
|
||||
end
|
||||
end
|
||||
|
||||
function ping(addr,times,timeout)
|
||||
function netutil.ping(addr,times,timeout)
|
||||
local times, timeout = times or 5, timeout or 30
|
||||
for i = 1, times do
|
||||
local ipt = computer.uptime()
|
||||
|
@ -22,6 +22,19 @@ function shutil.import(lib)
|
||||
end
|
||||
require(lib)
|
||||
nE[#nE+1] = lib
|
||||
os.setenv("INCLUDE",nE)
|
||||
return true
|
||||
end
|
||||
|
||||
function shutil.unimport(lib)
|
||||
local cE = os.getenv("INCLUDE") or shell.include
|
||||
local nE = {}
|
||||
for k,v in pairs(cE) do
|
||||
if v ~= lib then
|
||||
nE[#nE+1] = v
|
||||
end
|
||||
end
|
||||
os.setenv("INCLUDE",nE)
|
||||
return true
|
||||
end
|
||||
|
||||
@ -103,5 +116,6 @@ end
|
||||
shutil.cd = os.chdir
|
||||
shutil.mkdir = fs.makeDirectory
|
||||
shutil.cp = fs.copy
|
||||
shutil.rm = fs.remove
|
||||
|
||||
return shutil
|
||||
|
Loading…
Reference in New Issue
Block a user