2017-05-01 13:32:39 +00:00
|
|
|
|
|
|
|
local sDrive = nil
|
|
|
|
local tArgs = { ... }
|
|
|
|
if #tArgs > 0 then
|
2017-05-17 18:32:21 +00:00
|
|
|
sDrive = tostring( tArgs[1] )
|
2017-05-01 13:32:39 +00:00
|
|
|
end
|
|
|
|
|
|
|
|
if sDrive == nil then
|
2017-05-17 18:32:21 +00:00
|
|
|
print( "This is computer #"..os.getComputerID() )
|
2018-12-17 17:22:15 +00:00
|
|
|
|
2017-05-17 18:32:21 +00:00
|
|
|
local label = os.getComputerLabel()
|
|
|
|
if label then
|
|
|
|
print( "This computer is labelled \""..label.."\"" )
|
|
|
|
end
|
2017-05-01 13:32:39 +00:00
|
|
|
|
|
|
|
else
|
2017-05-17 18:32:21 +00:00
|
|
|
local bData = disk.hasData( sDrive )
|
|
|
|
if not bData then
|
|
|
|
print( "No disk in drive "..sDrive )
|
|
|
|
return
|
|
|
|
end
|
2018-12-17 17:22:15 +00:00
|
|
|
|
2017-05-17 18:32:21 +00:00
|
|
|
print( "The disk is #"..disk.getID( sDrive ) )
|
2017-05-01 13:32:39 +00:00
|
|
|
|
2017-05-17 18:32:21 +00:00
|
|
|
local label = disk.getLabel( sDrive )
|
|
|
|
if label then
|
|
|
|
print( "The disk is labelled \""..label.."\"" )
|
|
|
|
end
|
2017-05-01 13:32:39 +00:00
|
|
|
end
|