StScriptFile Class Reference

This class represents script when it's exists on local file system as regular file. More...

#include <stscriptfile.h>

Inheritance diagram for StScriptFile:

StApplication StThread List of all members.

Public Member Functions

 StScriptFile ()
 StScriptFile (const StFile &script, const StFile &shell=ST_DEFAULT_SHELL)
bool setShell (const StFile &shell)
void setScript (const StFile &script)
void setArguments (const StStringList &args)
void setArguments (const StString &arg)
bool execute (bool wait=true, bool outputToFile=true)
StFile getScript () const

Protected Attributes

StStringList args

Private Member Functions

bool setExecutable (const StFile &file)
 Disallow of use this function couse of possible missunderstand.

Private Attributes

StFile scriptFile

Detailed Description

This class represents script when it's exists on local file system as regular file.

StScriptFile allows you to execute a script like you would in a shell. It does not load file and you cannot edit it in memory and then execute. This possibly gives you StScript class.

See also:
StScript and StApplication


Constructor & Destructor Documentation

StScriptFile::StScriptFile (  )  [inline]

StScriptFile::StScriptFile ( const StFile script,
const StFile shell = ST_DEFAULT_SHELL 
) [inline]


Member Function Documentation

bool StScriptFile::execute ( bool  wait = true,
bool  outputToFile = true 
) [inline]

Execute the script.

Parameters:
wait - stop execution while executing the script? If no, you can always check hasFinished()

Reimplemented from StApplication.

StFile StScriptFile::getScript (  )  const [inline]

Get the current script StFile

void StScriptFile::setArguments ( const StString arg  )  [inline]

Overloaded version of function above. But add argument as one, not multiple.

Reimplemented from StApplication.

void StScriptFile::setArguments ( const StStringList args  )  [inline]

Set arguments to execute with script.

Reimplemented from StApplication.

bool StScriptFile::setExecutable ( const StFile file  )  [inline, private]

Disallow of use this function couse of possible missunderstand.

Reimplemented from StApplication.

void StScriptFile::setScript ( const StFile script  )  [inline]

Point to script file to execute. When set, file can not exist.

bool StScriptFile::setShell ( const StFile shell  )  [inline]

This can be for example /bin/bash for bash scripts or /usr/bin/php for php scripts. When set, file can not exist.


Member Data Documentation

StStringList StScriptFile::args [protected]

Reimplemented from StApplication.

StFile StScriptFile::scriptFile [private]


The documentation for this class was generated from the following file:
Generated on Tue Nov 14 21:15:10 2006 for Smart Tools Library by  doxygen 1.4.7