Allows basic operations with files in NWScript. Note that this plugin has access only to files on server side!
To get it work, you need NWNX2. If you are not familiar with it, see NWNX2 web site. Then you just need to put nwnx_files.dll into NWN root and run nwserver via NWNX2.
Zip package contains NWScript include script with full notes about each function. You have to add this script into your module and include it in your scripts.
Then you gain access to these functions:
1.1
int GetSystemTime();
int FileRenameFile(string filename, string path, string newname);
string GetNewestBic(object oPC);
+ FileTime do not longer return struct time but integer containing unix time
1.0
int FileExists(string filename, string path="");
int FileDeleteFile(string filename, string path="");
int FileDeleteDirectory(string dirname, string path="");
string FileMD5(string filename, string path="");
int FileClose();
int FileWrite(string sString);
int FileSize(string filename, string path="");
int FileOpen(string filename, string path="", int nMode = FILE_OPEN_MODE_FOR_READING);
int FileCopy(string filename, string path, string newpath, string newname="", int rewrite_if_exists=FALSE);
string FileRead();
struct time FileTime(string filename, string path="", int nTime=FILE_TIME_OF_WRITE);
int FileCreateFile(string filename, string path="");
int FileCreateDirectory(string dirname, string path="");
string FileGetFirst(string path="", string filter="*", int mode=FILE_SEARCH_FOR_FILES);
string FileGetNext(string path="", string filter="*", int mode=FILE_SEARCH_FOR_FILES);
Development of this function set has been stopped due to Terra_777 overcame me with his nwnx_systemdata2 plugin which added (after it appeared here) all file functions + ini handling...
Anyway, if someone consider using mine plugin instead (for example GetSystemTime is better there because it returns int number not some struct) I'm willing to get back to developing new features if you will ask me.