There is the DateFileSystem whitch is super usefull but in this case I just want to write a simple text file.
I assume that the most of System.IO is blocked.
and that is what I've right now but upcause that escabes newlines witch is not what I want in my textfile.
Not at the moment, we only provide a wrapper for JSON files. For anything else, you’d have to write and extension.
In response to Wulf ():
Ohhh danm, The reson why I wanted to do this was because I have this command called /adminhelp its ment to be used by players to ask questions while I'm not online, right now its saved in a common json file, and is read by an admin command.
I thouth it would be simplere to save it as a raw text file insted and then use the Append write method to not let it effect ram.
I want it to be a file I would nerver clear or delete.
If I would have to use the Datefilesystem I would have to load the hole file into ram evreysingle time, witch would eventuelly kill the ram ):
You got any ideas?
You could always load it, save it, and then null it.
Yeah but the file would take up ram in the couble of secounds it exists then.
The file would eventuelly get big enouth and so the file gets bigger then the available ram.
In response to TactiTac0z ():
Can you imagine a file big enough to take atleast 1MB? I doubt your players can write so many questions in a year.
It's your business, but I highly unrecommend wasting time on optimization in this case, it's just useless.
In response to 2CHEVSKII ():
Ohhh my friend.. You've no idea... lol
But just out of ceriosity 1KB is 1000 bytes right? and 1MB is 1 million bytes..
(While writeing this I recall how much mordern memory standards are)
But Strings in C# ussially uses a unicode format right? So in the worst case senario a letter chould take up to 2-4 bytes.
and sence my server ussaliy only got about 1000 to 1400 KB memory available and that poeple ussially write messages between 5 and 20 letters of leanth Poelpe whould have to write like 10000 ish messages to get even close to kill the ram... ok fine, I supose it won't be an issue for a while... (ok not counting that I would have to save a name and timestamp)
Keep in mind when I wrote the messages above I forgot how high the memory standards are nowadays...
Last time I worried about ram I was programming a minecraft computercraft computer they only got like 1-2K XD.
I'm sure at least one of you can relate to that...
OK currection its opencomputers computers that got no ram what so fuckin ever...