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.
Posted 1 week ago#1View post
|Not at the moment, we only provide a wrapper for JSON files. For anything else, you’d have to write and extension.|
Posted 1 week ago
Last updated 1 week ago#2View post
In response to Wulf (View post):
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?
Posted 4 days ago#3View post
|You could always load it, save it, and then null it.|
Posted 4 days ago#4View post
| 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.
Posted 4 days ago#5View post
In response to TactiTac0z (View post):
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.
Posted 4 days ago
Last updated 4 days ago#6View post
In response to 2CHEVSKII (View post):
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...
Posted 4 days ago
Last updated 4 days ago#7View post