![]() |
|
This file is part of OpenFOAM. OpenFOAM is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. OpenFOAM is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenFOAM; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
Functions used by FOAM which are specific to the unix operating system, and need to be replaced or simulated on any other system.
Definition in file OSspecific.H.
Go to the source code of this file.
Namespaces | |
namespace | Foam |
Functions | |
pid_t | pid () |
Return the PID of this process. | |
pid_t | ppid () |
Return the parent PID of this process. | |
pid_t | pgid () |
Return the group PID of this process. | |
bool | env (const word &) |
Return true if environment variable of given name is defined. | |
string | getEnv (const word &name) |
Return environment variable of given name. | |
bool | setEnv (const word &name, const string &value, const bool overwrite) |
Set an environment variable. | |
word | hostName () |
Return the system's host name. | |
word | userName () |
Return the user's login name. | |
fileName | home () |
Return home directory path name. | |
fileName | cwd () |
Return home directory path name. | |
bool | chDir (const fileName &dir) |
Change the current directory to the one given and return true,. | |
fileName | dotFoam (const fileName &name) |
Return .foam directory path name. | |
bool | mkDir (const fileName &, mode_t=0754) |
Make a directory and return an error if it could not be created. | |
bool | chmod (const fileName &, const mode_t=0640) |
Set the file mode. | |
mode_t | mode (const fileName &) |
Return the file mode. | |
fileName::Type | type (const fileName &) |
Return the file type: FILE or DIRECTORY. | |
bool | exists (const fileName &name) |
Does the name exist in the filing system? | |
bool | file (const fileName &) |
Does the file exist? | |
bool | dir (const fileName &) |
Does the directory exist? | |
off_t | size (const fileName &) |
Return size of file. | |
time_t | lastModified (const fileName &) |
Return time of last file modification. | |
fileNameList | readDir (const fileName &, const fileName::Type=fileName::FILE, const bool filtergz=true) |
Read a directory and return the entries as a string list. | |
bool | cp (const fileName &srcFile, const fileName &destFile) |
Copy, recursively if necessary, the source to the destination. | |
bool | mv (const fileName &srcFile, const fileName &destFile) |
Rename srcFile destFile. | |
bool | rm (const fileName &) |
Remove a file returning true if successful otherwise false. | |
bool | rmDir (const fileName &) |
Remove a dirctory and it's contents. | |
unsigned int | sleep (const unsigned int) |
Sleep for the specified number of seconds. | |
void | fdClose (const int) |
Close file descriptor. | |
bool | ping (const word &, const label port, const label timeOut) |
Check if machine is up by pinging given port. | |
bool | ping (const word &, const label timeOut=10) |
Check if machine is up by ping port 22 = ssh and 222 = rsh. |
|
Change the current directory to the one given and return true,. else return false |
|
Set the file mode.
|
|
Copy, recursively if necessary, the source to the destination.
Referenced by specieThermo::a(), specieThermo::cv(), and specieThermo::specieThermo(). |
|
Return home directory path name.
|
|
Does the directory exist?
Referenced by PrimitivePatch< face, IndirectList, const pointField & >::isInternalEdge(). |
|
Return .foam directory path name.
|
|
Return true if environment variable of given name is defined.
|
|
Does the name exist in the filing system?
|
|
Close file descriptor.
|
|
Does the file exist?
|
|
Return environment variable of given name.
|
|
Return home directory path name.
|
|
Return the system's host name.
|
|
Return time of last file modification.
|
|
Make a directory and return an error if it could not be created. and does not already exist |
|
Return the file mode.
|
|
Rename srcFile destFile.
|
|
Return the group PID of this process.
|
|
Return the PID of this process.
|
|
Check if machine is up by ping port 22 = ssh and 222 = rsh.
|
|
Check if machine is up by pinging given port.
|
|
Return the parent PID of this process.
|
|
Read a directory and return the entries as a string list.
|
|
Remove a file returning true if successful otherwise false.
|
|
Remove a dirctory and it's contents.
|
|
Set an environment variable.
|
|
|
Sleep for the specified number of seconds.
|
|
|
Return the user's login name.
|