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

[FS] ../ doesnt work?

Started by rickydaan, 27 November 2012 - 04:29 AM
rickydaan #1
Posted 27 November 2012 - 05:29 AM
Hey, another (stupid) question… How to do like: fs.list("../lol")?
../ doesnt work, /../ doesnt work too… :(/>]

Rickydaan
remiX #2
Posted 27 November 2012 - 06:21 AM
What do you mean it doesn't work? All you have to do is:
fs.list("directory") -- It's not that hard? :P/>

What does it do you when try it?
Cranium #3
Posted 27 November 2012 - 06:30 AM
So the directory name is "lol"? if so, just do fs.list("lol")
If the directory is ".lol" use fs.list(".lol")
Kingdaro #4
Posted 27 November 2012 - 06:55 AM
Normally "../" means "the directory above the current one", and I don't think FS takes the current directory into account, it only goes from the root.

It might be helpful to know that shell.getDir() can get the current directory, though.
rickydaan #5
Posted 28 November 2012 - 03:21 AM
Thx king, I hope that will help me with my bigga code :3 It uses a bunch of different API's, and i dont want all things in the root so they need to go a folder up… Thx anyway