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

Allow .startup as alternative name for startup

Started by immibis, 03 February 2013 - 10:15 AM
immibis #1
Posted 03 February 2013 - 11:15 AM
Computers should be able to run ".startup" files as well as "startup" files when they boot, for when you don't want to clutter up ls.
"startup" would take precedence.
Kingdaro #2
Posted 03 February 2013 - 11:19 AM
Removing one file from the file listing wouldn't reduce clutter very well. If anything, you should just move the rest of your programs to some sort of "apps" folder.
immibis #3
Posted 03 February 2013 - 11:34 AM
Removing one file from the file listing wouldn't reduce clutter very well. If anything, you should just move the rest of your programs to some sort of "apps" folder.
It would when you have only one file and one folder visible (startup and rom, apps can be hidden)
Dlcruz129 #4
Posted 03 February 2013 - 11:40 AM
This would be nice for secret login systems and what not.

However, you would be able to make invisible viruses, so I'm not sure if this will get added…
immibis #5
Posted 03 February 2013 - 03:05 PM
This would be nice for secret login systems and what not.

However, you would be able to make invisible viruses, so I'm not sure if this will get added…
As long as you know .startup exists, you can look for it. "rm .startup" will still delete the virus. "edit .startup" will still show its code.
I've already made a virus that used a sandbox to hide itself, which was more harder to detect than this by itself could ever be.
Tiin57 #6
Posted 03 February 2013 - 04:01 PM
On OS X, files starting with "." are automatically hidden from the file system. Probably not happening.
lieudusty #7
Posted 03 February 2013 - 04:20 PM
You can do this yourself, just edit the shell.
Dlcruz129 #8
Posted 03 February 2013 - 05:53 PM
This would be nice for secret login systems and what not.

However, you would be able to make invisible viruses, so I'm not sure if this will get added…
As long as you know .startup exists, you can look for it. "rm .startup" will still delete the virus. "edit .startup" will still show its code.
I've already made a virus that used a sandbox to hide itself, which was more harder to detect than this by itself could ever be.

Of course, but it would still be a great way to fool noobs.
BigSHinyToys #9
Posted 03 February 2013 - 07:10 PM
MouseFB shows all files including files starting with "." the ls/dir program is designed to ignore them but fs.list still returns all files and folders regardless of the "." I don't think a ".startup" would be very useful but that is just me.
immibis #10
Posted 03 February 2013 - 10:35 PM
You can do this yourself, just edit the shell.
Good thing I have access to the rom folder of every server the program could ever run on!

tiin57: CC does that as well.
Cloudy #11
Posted 03 February 2013 - 11:59 PM
Nah, I don't like this. IMO if there's a startup file, it should be visible by default.
KaoS #12
Posted 04 February 2013 - 05:23 AM
if it can be done with code generally it is not added…

simply add

local l=fs.list
fs.list=function(...)
  local tList=l(...)
  local num
  for i=1,#tList do
    if shell.resolve((tList[i])=="startup" then
	  num=i
	  break
    end
  end
  if num then table.remove(tList,num)
  return tList
end

it's messy I know, just wrote it quickly while busy. point is you can do this yourself