37 namespace fileOperations
55 for (
int argi = 1; argi < argc; ++argi)
57 const char *optName = argv[argi];
59 if (optName[0] ==
'-')
62 bool emitErrorMessage =
false;
64 if (strcmp(optName,
"ioRanks") == 0)
76 emitErrorMessage =
true;
86 <<
"Error: option '-" << optName
87 <<
"' requires an argument" <<
nl <<
nl;
96 for (
int i=index+2; i<argc; i++)
115 auto* ctorPtr = wordConstructorTable(
type);
121 "fileOperationInitialise",
123 *wordConstructorTablePtr_
127 return autoPtr<fileOperationInitialise>(ctorPtr(argc, argv));
error FatalError
Error stream (stdout output on all processes), with additional 'FOAM FATAL ERROR' header text and sta...
constexpr char nl
The newline '\n' character (0x0a)
Ostream & endl(Ostream &os)
Add newline and flush stream.
#define FatalErrorInLookup(lookupTag, lookupName, lookupTable)
Report an error message using Foam::FatalError.
Macros for easy insertion into run-time selection tables.
static autoPtr< fileOperationInitialise > New(const word &type, int &argc, char **&argv)
Select initialisation type.
Functions used by OpenFOAM that are specific to POSIX compliant operating systems and need to be repl...
fileName::Type type(const fileName &name, const bool followLink=true)
Return the file type: DIRECTORY or FILE, normally following symbolic links.
A class for handling words, derived from Foam::string.
#define DebugInFunction
Report an information message using Foam::Info.
errorManip< error > abort(error &err)
fileOperationInitialise(int &argc, char **&argv)
Construct from components.
defineRunTimeSelectionTable(fileOperationInitialise, word)
messageStream Info
Information stream (stdout output on master, null elsewhere)
Pointer management similar to std::unique_ptr, with some additional methods and type checking...
defineTypeNameAndDebug(collatedFileOperation, 0)
bool setEnv(const word &name, const std::string &value, const bool overwrite)
Set an environment variable, return true on success.