• File Writing
    2 replies, posted
Hello, I've searched the wiki before anyone says 'use the wiki'. It has nothing about this, I think xD So I want to write a file, a .txt to a specific folder. [LUA] file.CreateDir( "test" ) file.Write( "test.txt", "Hello" ) [/LUA] That's my test code. Here is the wiki. [URL="http://wiki.garrysmod.com/page/file/Write"]http://wiki.garrysmod.com/page/file/Write[/URL] If anyone could help me write that .txt to the directory created above that would be awesome! I know that when I create the directory it's created in the data folder and I know file.Write by default writes to the data folder. Thanks, Munch
Huh, aren't you familiar with file paths at all? [code] file.CreateDir("somedir") file.Write("somedir/test.txt", "Abcdef") [/code]
[QUOTE=mijyuoon;48458304]Huh, aren't you familiar with file paths at all? [code] file.CreateDir("somedir") file.Write("somedir/test.txt", "Abcdef") [/code][/QUOTE] Thank you very much!
Sorry, you need to Log In to post a reply to this thread.