Getting various MyChat Server folders.

 

Syntax

function mGetServerServiceFolder(iType: integer): string;

 

Parameters and return values

Parameter

Type

Value

iType

integer

folder that you need to get. Possible variants::

0 — path to the folder with current text protocols;

1 — path to the folder with MyChat Server data;

2 — full path to the mcserv.exe module (including command line parameters);

3 — full path to the mcserv.exe module;

4 — full path to the common folder of the built-in FTP server;

5 — full path to the users folder of the built-int FTP server;

6 — full path to the backup copies of the server database;

7 — full path to the file folder with images that were sent by users in the chat;

8 — full path to the folder with text logs.

 

Function result

Text string. If you specify a nonexistent folder number, the function returns an empty string.

 

Example


begin
  mLogScript(mGetServerServiceFolder(0), 'Server today logs folder');
  mLogScript(mGetServerServiceFolder(1), 'Server data folder');
  mLogScript(mGetServerServiceFolder(2), 'mcserv.exe full command line');
  mLogScript(mGetServerServiceFolder(3), 'mcserv.exe start folder');
end.


Script work result

[12:47:21] (Log "mGetServerServiceFolder"): [Server today logs folder] C:\ProgramData\Server\logs\2016\10\20\

[12:47:21] (Log "mGetServerServiceFolder"): [Server data folder] C:\ProgramData\Server\

[12:47:21] (Log "mGetServerServiceFolder"): [mcserv.exe full command line] E:\Projects\MC\Sources\Server\mcserv.exe

[12:47:21] (Log "mGetServerServiceFolder"): [mcserv.exe start folder] E:\Projects\MC\Sources\Server\

[12:47:21] (Run "mGetServerServiceFolder"): Script operation time: 2 ms

[12:47:21] (Run "mGetServerServiceFolder"): Script done successfully.

 

See also

mLogScript