VOS

A class to interface with the host operating system in a platform independent fashion.

Synopsis

 * Header:
 * 


 * Class name:
 * vOS

Description
This class is meant to provide a fairly platform independent way of interfacing with common system dependent functions.

int vDeleteFile(const char* filename)
Deletes the specified file.

int vChDrive(int drive)
On MS-Windows, changes to the specified disk drive, where "A:"==0, "B:"==1, and so on. This method has no effect on X.

int vGenEnvVal(char* name, char* val, int maxlen)
Returns to val the value of the environment variable specified in name. val has a maximum length of maxlen. The return value is false on failure to find the variable.

int vGetUserName(char* s, int len)
Returns to s a system dependent string corresponding to the current User Name.

void vGetHostName(char* s, int len)
Returns to s</tt> a system dependent string corresponding to the host name of the system.

long vGetPid
Returns a system dependent value corresponding to the current process id.

int vGetCWD(char* s, int len)
Returns to s</tt> a system dependent string corresponding to the current working directory.

int vChDir(const char* path)
Changes active directory to the one specified by path</tt>.

int vRunProcess(const char* cmd, const char* StdOut, const char* StdErr, int Wait, int minimize)
This function is used to start an external process. cmd</tt> is used to specify the complete command line, e.g., "prog -s x.tmp". StdOut</tt> and StdErr</tt> may be used to specify a file name. If supplied, then standard out and standard error of the process will be redirected to those files. If Wait</tt> is true, then vRunProcess</tt> won't return until the process has terminated. If minimize</tt> is true, then the process will be started in a minimized state. vRunProcess</tt> return the exit code of the process.