36 posts
Posted 26 August 2013 - 06:27 PM
Hi i im trying to make a operating system that allows multiple people to make different profiles on it. The only problem is that i don't know how to save the users data so its there for ever in the program until they delete there profile or change it for example they change there password. So if anyone can help that would be great and when i make a youtube video on the os… when its done ill give shout out who helped. So basically i just need some thing that will sava user inputs until its deleted or changed. BYE
1688 posts
Location
'MURICA
Posted 26 August 2013 - 07:11 PM
So, what have you got so far?
36 posts
Posted 26 August 2013 - 07:29 PM
nothing this well be my starting point in the project
15 posts
Posted 26 August 2013 - 07:37 PM
Have a look at the
fs api, specifically
fs.open.
fileHandle = fs.open("somefile", "w") --open the file somefile in write mode (file is erased)
fileHandle.write("some stuff")
fileHandle.close()
fileHandle = fs.open("somefile", "r") --open the file somefile in read mode
myString = fileHandle.readAll()
fileHandle.close()
Always remember to close your file after you're done reading from/writing to it.
7508 posts
Location
Australia
Posted 26 August 2013 - 07:37 PM
This is a very common thing that is asked for. As such I've wrote up an explanation countless times, don't have the time or will to do it now, so I'll just link you to one of them….
http://www.computercraft.info/forums2/index.php?/topic/13504-making-multiple-users-on-one-computer/Make sure you read the entire thread.
36 posts
Posted 26 August 2013 - 08:15 PM
ok thanks
36 posts
Posted 26 August 2013 - 09:03 PM
let me look an ill get back