This is a read-only snapshot of the ComputerCraft forums, taken in April 2020.
brett122798's profile picture

Access Denied to fs.delete?

Started by brett122798, 07 October 2012 - 08:35 PM
brett122798 #1
Posted 07 October 2012 - 10:35 PM
Hey, I'm pretty confused on how when deleting this file, it says "Access Denied." Here's a small part of the code:


if fs.exists(location.."/chat") == true then
fs.delete(location.."/chat")
end
Orwell #2
Posted 07 October 2012 - 10:46 PM
Hey, I'm pretty confused on how when deleting this file, it says "Access Denied." Here's a small part of the code:


if fs.exists(location.."/chat") == true then
fs.delete(location.."/chat")
end

This depends on the value of location, what is it? You can't delete files in /rom . And often, you can't delete files that are opened externally or something like that.
Lyqyd #3
Posted 07 October 2012 - 10:46 PM
Where is the file at? If it's in rom, you cannot edit the rom, so it would most certainly say "Access Denied".
brett122798 #4
Posted 07 October 2012 - 10:49 PM
Fixed the problem, don't know why it happened, really.
remiX #5
Posted 08 October 2012 - 02:01 AM
How did you manage to fix the problem brett?
brett122798 #6
Posted 08 October 2012 - 04:22 AM
How did you manage to fix the problem brett?
Well, I tried manually deleting the file and it said it was in use by Java, so I reset my server and it was fine.
Pinkishu #7
Posted 08 October 2012 - 08:00 AM
I had that happen to me when I opened files in programs but didn't close them xD
brett122798 #8
Posted 08 October 2012 - 03:23 PM
I had that happen to me when I opened files in programs but didn't close them xD
I actually always have my programs open without conflict.
Lyqyd #9
Posted 08 October 2012 - 03:51 PM
I had that happen to me when I opened files in programs but didn't close them xD
I actually always have my programs open without conflict.

No, he means that this is what happens when you open a file handle in ComputerCraft and then don't close it.
Pinkishu #10
Posted 08 October 2012 - 03:52 PM
I had that happen to me when I opened files in programs but didn't close them xD
I actually always have my programs open without conflict.

No, he means that this is what happens when you open a file handle in ComputerCraft and then don't close it.

Yeah, thats what she meant
brett122798 #11
Posted 08 October 2012 - 10:30 PM
I had that happen to me when I opened files in programs but didn't close them xD
I actually always have my programs open without conflict.

No, he means that this is what happens when you open a file handle in ComputerCraft and then don't close it.

Yeah, thats what she meant
1. lol

2. Oh, ok. Didn't read your post right.