Thread Rating:
  • 2 Vote(s) - 4.5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
File Loader v1.0
#1
Implementation:

Code:
<module src="GO_wFileLoader.nud" type="server" /> // For windows
<module src="GO_lFileLoader.nud" type="server" /> // For linux

Squirrel function:
userpointer handler = fileOpen(string file, string fileMode)
bool fileExists(string filename)
bool fileClose(userpointer handler)
bool fileWrite(userpointer handler, string text)
string fileRead(userpointer handler)
bool fileRename(string oldname, string newname)
bool fileRemove(string filename)
int fileLength(userpointer handler)
Short example:

Code:
local file = fileOpen("test.txt", "r+")
if(file)
{
    print("File opened succesfully.");
    fileWrite(file, "Lorem ipsum...");
    fileClose(file);

    file = fileOpen("test.txt", "r+");
    local readString = fileRead(file); // fileRead functions now return line as string, there is no second parameter "buffer"
    print(readString);
    fileClose(file);
}
Download version 1.0:
Windows: https://mega.nz/#!CYYGiRSb!wthbuogO5kseP...yg4hvXRQcA
Linux: https://mega.nz/#!KIQEQawK!uEKve1P1wTWSQ...EPZ2Y-MTkc

Creditsy:
Sative - wersja 0.3
Reply


Messages In This Thread
File Loader v1.0 - by Nubzior - 09.10.2015, 17:13
RE: File Loader v0.3 - by Axe - 07.12.2015, 07:21
RE: File Loader v0.3 - by Sative - 07.12.2015, 09:53
RE: File Loader v0.3 - by Axe - 07.12.2015, 12:55
RE: File Loader v0.3 - by Sative - 07.12.2015, 12:57
RE: File Loader v0.3 - by Axe - 07.12.2015, 13:06
RE: File Loader v0.3 - by HammelGammel - 07.12.2015, 14:04
RE: File Loader v0.3 - by Axe - 07.12.2015, 17:27
RE: File Loader v0.3 - by HammelGammel - 07.12.2015, 21:22
RE: File Loader v0.3 - by Bimbol - 23.12.2015, 21:49
RE: File Loader v0.3 - by HammelGammel - 23.12.2015, 22:27
RE: File Loader v0.4 - by Nubzior - 12.01.2016, 09:57
RE: File Loader v0.4 - by HammelGammel - 12.01.2016, 13:26
RE: File Loader v0.4 - by Nubzior - 14.01.2016, 08:06
RE: File Loader v0.4 - by HammelGammel - 14.01.2016, 16:31
RE: File Loader v0.4 - by Nubzior - 30.01.2016, 09:13
RE: File Loader v0.4 - by HammelGammel - 30.01.2016, 16:26
RE: File Loader v0.4 - by Nubzior - 09.02.2016, 03:10
RE: File Loader v1.0 - by HammelGammel - 09.02.2016, 20:16
RE: File Loader v1.0 - by Nubzior - 09.02.2016, 20:24

Forum Jump:


Users browsing this thread: 1 Guest(s)