404 posts
Location
St. Petersburg
Posted 24 January 2013 - 07:01 PM
we need to start standardizing where our programs save their data and files.
my suggestion is to follow
FHS (shown below), but other suggestions would be appreciated
/ -- root directory
/bin -- command binaries (for use in terminals)
/boot -- programs to run at startup, such as bootloaders
/dev -- probably would be used for device drivers instead of devices
/etc -- config files
/home -- user files
/lib -- program libraries
/media -- media drivers
/mnt -- no idea for CC
/opt -- optional packages
/proc -- kernel filesystem
/root -- root filesystem
/sbin -- system binaries
/srv -- no idea for CC
/tmp -- temporary files
/usr -- pseudo-read-only user files
/var -- logs and caches
3790 posts
Location
Lincoln, Nebraska
Posted 24 January 2013 - 07:03 PM
This may be fine and all for serious programming but…..you know this is for a game right?
7508 posts
Location
Australia
Posted 24 January 2013 - 07:05 PM
I semi do this for my programs anyways… except I use ".support/<prog-name>"
404 posts
Location
St. Petersburg
Posted 24 January 2013 - 07:24 PM
This may be fine and all for serious programming but…..you know this is for a game right?
yeah, but this would prevent save directory collisions
686 posts
Posted 25 January 2013 - 02:06 AM
This may be fine and all for serious programming but…..you know this is for a game right?
yeah, but this would prevent save directory collisions
How? Just save to <programname>.
Save directory collision is not something I've ever seen anyone have problems with.
445 posts
Posted 25 January 2013 - 03:23 AM
This may be fine and all for serious programming but…..you know this is for a game right?
Just cause its a game doesn't mean you have to make your programs a pain for users :P/>
2447 posts
Posted 25 January 2013 - 03:25 AM
This is pointless to be honest. Standardisation won't help anything.
1243 posts
Location
Indiana, United States
Posted 25 January 2013 - 09:23 AM
This is pointless to be honest. Standardisation won't help anything.
I agree, there's little to no save directory collisions in the first place.
474 posts
Posted 25 January 2013 - 09:29 AM
This is pointless to be honest. Standardisation won't help anything.
I agree, there's little to no save directory collisions in the first place.
Yeah, I use .thesbros/programname, who else would use that path?
992 posts
Posted 25 January 2013 - 12:24 PM
I put the config in the same folder as the program or in the root but it is easily changed in the code if there are major problems.
Spoiler
local config = "mouse.cfg"
local temp
if shell and shell.getRunningProgram then
temp = shell.getRunningProgram()
end
temp = temp or "/bla"
local localPath = string.sub(temp,1,#temp-string.len(fs.getName(temp)))
temp = nil -- just because not needed
-- load config file
if fs.exists(localPath.."/"..config) then
load()
else
useDefault()
end
40 posts
Location
The Coffee Maker
Posted 25 January 2013 - 02:22 PM
This could be useful to make sure that there is no data loss from switching Operating Systems. You could just switch out your old operating system for a new one and all files would be exactly the same.
686 posts
Posted 25 January 2013 - 02:38 PM
This could be useful to make sure that there is no data loss from switching Operating Systems. You could just switch out your old operating system for a new one and all files would be exactly the same.
Except they probably don't use the same format, so even if they're in the same location, they might not be readable.