Main Page | Class Hierarchy | Compound List | File List | Compound Members | File Members | Related Pages

Control.OS Class Reference

List of all members.

Detailed Description

A static class for operating system calls.


Static Public Member Functions

char[] commandName ()
 Return the command name that allegedly created this process.

void currentWorkingDirectory (char[] path)
 Assign the current working directory.

char[] currentWorkingDirectory ()
 Return the current working directory.

char[] environmentVariable (char[] name)
 Return an environment variable or null if this is not assigned.

void environmentVariable (char[] name, char[] value)
 Assign an environment variable.

int system (char command[], char args[][])
 Run a command in system and return the result.

char[] pathDir (char[] path)
 Split the directory from a string; for example, 'src/foo.c' becomes 'src/'.

char[] pathNotDir (char[] path)
 Split everything but the directory from a string; for example, 'src/foo.c' becomes 'foo.c'.

char[] pathSuffix (char[] path)
 Split the suffix from a string; for example, 'src/foo.c' becomes '.c'.

char[] pathBaseName (char[] path)
 Extract all but the suffix from a string; for example, 'src/foo.c' becomes 'src/foo'.


Member Function Documentation

char [] Control.OS.pathDir charpath  []  )  [static]
 

Split the directory from a string; for example, 'src/foo.c' becomes 'src/'.

If there is no directory, null is returned.

int Control.OS.system char  command[],
char  args[][]
[static]
 

Run a command in system and return the result.

Parameters:
command The path and filename of the executable. This is either an absolute path or searched using whatever path settings are made for this operating system. You can control other parameters by prefixing characters to the command. Prefixing "&" makes the execution asynchronous, so that it creates an entirely different process and returns zero rather than waiting for it to finish. "%" shows a command window.
args A list of arguments passed to the command.
Returns:
The return value from the executable or zero if it is asynchronous.


The documentation for this class was generated from the following file:
Generated on Thu Sep 4 13:12:51 2003 for dig by doxygen 1.3.2