how can I tell the computer that the disk has ejected or isn't there but it really still is?
Eject Disk Without Ejecting Disk
Started by Imque, Apr 16 2013 11:51 PM
6 replies to this topic
#1
Posted 16 April 2013 - 11:51 PM
#2
Posted 16 April 2013 - 11:53 PM
what?
#3
Posted 17 April 2013 - 12:05 AM
Do you mean how do you hide the /disk/ folder so that other people cannot access it? I would use function replacement.
Replace fs.list and fs.open functions to not allow the /disk/ folder to be accessed.
Replace fs.list and fs.open functions to not allow the /disk/ folder to be accessed.
#4
Posted 17 April 2013 - 12:42 AM
You can tell when a disk is ejected by using the disk_eject event. However, the disk would no longer be in the drive if the event fired. So, I don't think I understand the second part of your question.
#5
Posted 17 April 2013 - 01:09 AM
You can use the disk.isPresent(string side) function
I hope this answers your question
Off-topic: SuicidalSTDz check your PM! D:
for _,v in pairs(peripheral.getNames()) do
if periheral.getType( v ) == "drive" then
if disk.isPresent( v ) then
print("Disk is in the drive!")
end
end
end
I hope this answers your question
Off-topic: SuicidalSTDz check your PM! D:
#6
Posted 17 April 2013 - 01:14 AM
He want to tell the computer that there isn't a card but there is a card.
I don't know how you can handle it but I have seen that somebody doesn't understand he ^^
I don't know how you can handle it but I have seen that somebody doesn't understand he ^^
#7
Posted 17 April 2013 - 12:30 PM
I believe the OP wants to unmount the disk. (At least, that fits with my definition of 'unmount', removing access without removing the disk, essentially)
Having said that, I do not believe there is a way to do such, unless you do something with function replacement, as already mentioned.
Having said that, I do not believe there is a way to do such, unless you do something with function replacement, as already mentioned.
1 user(s) are reading this topic
0 members, 1 guests, 0 anonymous users











