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

Hidden Files

Started by exosceleton, 31 July 2016 - 07:49 AM
exosceleton #1
Posted 31 July 2016 - 09:49 AM
CraftOS will hide files beginning with a period (.) from the Auto Complete, fs.list() and any similar functions.
For reference: http://askubuntu.com...t-are-dot-files
Lyqyd #2
Posted 31 July 2016 - 05:19 PM
Dotfiles are hidden from the results given by the list program. Things like fs.list must still be able to see those files, though.
exosceleton #3
Posted 15 August 2016 - 07:04 PM
Dotfiles are hidden from the results given by the list program. Things like fs.list must still be able to see those files, though.
Yes I know. What I meant was that the auto complete in the shell should hide those files. It seems logical, since you could use that to create data files, like ".users" or ".data" or something. I agree that a accessing the file directly, or even using fs.list should work as usual. Its just that it would make sense, that the shell would not auto complete it. This means that its not completely hidden, but still… considered hidden.
Edited on 15 August 2016 - 05:06 PM
Adn #4
Posted 14 September 2016 - 05:55 PM
One could also implement a boolean argument for fs.list() to control wether to show or hide hidden files.
InternetUnexplorer #5
Posted 07 January 2017 - 07:31 PM
Yes, fs.list() shows all of the files in a directory.
This is a good thing, because without that it would be impossible to delete/modify those files from ANY program without knowing their exact names, and that would be a huge problem.
If you want, you can make your own version of fs.list() and replace the default one before the shell is loaded, but this may cause problems with other programs that will assume that fs.list() will show hidden files.


Oh, I see what you mean. I personally like autocomplete for hidden files, but it would be nice if there was a user configurable setting.
Edited on 07 January 2017 - 06:34 PM
H4X0RZ #6
Posted 07 January 2017 - 08:05 PM
Why shouldn't it autocomplete these files, though?

All the major Linux shells are doing this too, I believe, so i don't really see where you got that idea. The user should always be in control of their PC, and hiding files makes that a bit… hard.