![]() |
PhoenixPresentation
2.0.0
Set of cmake function to automate presentation generation
|
#include <stdio.h>
#include <ctime>
#include "unistd.h"
#include <sys/ioctl.h>
#include "PPath.h"
#include "phoenix_system.h"
Go to the source code of this file.
Functions | |
time_t | phoenix_getClock () |
Get current time. More... | |
time_t | phoenix_getClockNs () |
Get current time in nanosecond since the starting of the CPU (steady_clock) More... | |
double | phoenix_getClockSec () |
Get current time. More... | |
PString | phoenix_getDate () |
Get the current date. More... | |
PString | phoenix_getDateCompact () |
Get the current date. More... | |
short unsigned int | phoenix_getNbColTerminal () |
Get the number of columns of the terminal. More... | |
short unsigned int | phoenix_getNbRowTerminal () |
Get the number of rows of the terminal. More... | |
time_t | phoenix_getTime () |
Get the current time of the program. More... | |
bool | phoenix_popen (const PPath &executionLogFile, const PString &command, bool onlyLogOnFail) |
Execute the given command and returns the output of this command. More... | |
PString | phoenix_popen (const PString &command) |
Execute the given command and returns the output of this command. More... | |
int | phoenix_popen (PString &executionLog, const PString &command) |
Execute the given command and returns the output of this command. More... | |
PString | phoenix_whoami () |
Get the name of the current user. More... | |
time_t phoenix_getClock | ( | ) |
Get current time.
Definition at line 61 of file phoenix_system.cpp.
Referenced by phoenix_getClockSec(), and testPhoenixSystemTime().
time_t phoenix_getClockNs | ( | ) |
Get current time in nanosecond since the starting of the CPU (steady_clock)
Definition at line 68 of file phoenix_system.cpp.
Referenced by testPhoenixSystemTime().
double phoenix_getClockSec | ( | ) |
Get current time.
Definition at line 86 of file phoenix_system.cpp.
References phoenix_getClock().
Referenced by testPhoenixSystemTime().
PString phoenix_getDate | ( | ) |
Get the current date.
Definition at line 100 of file phoenix_system.cpp.
References phoenix_getTime().
Referenced by PLog::close(), PLog::open(), and testPhoenixSystemTime().
PString phoenix_getDateCompact | ( | ) |
Get the current date.
Definition at line 111 of file phoenix_system.cpp.
References phoenix_getTime().
Referenced by PLog::getLog(), and testPhoenixSystemTime().
short unsigned int phoenix_getNbColTerminal | ( | ) |
Get the number of columns of the terminal.
Definition at line 133 of file phoenix_system.cpp.
Referenced by testPhoenixSystemTime().
short unsigned int phoenix_getNbRowTerminal | ( | ) |
Get the number of rows of the terminal.
Definition at line 142 of file phoenix_system.cpp.
Referenced by testPhoenixSystemTime().
time_t phoenix_getTime | ( | ) |
Get the current time of the program.
Definition at line 93 of file phoenix_system.cpp.
Referenced by PLog::getLog(), phoenix_getDate(), phoenix_getDateCompact(), and testPhoenixSystemTime().
Execute the given command and returns the output of this command.
[out] | executionLogFile | : file which will get output of the given command, empty string if the command is empty or full log on fail |
command | : command to be executed | |
onlyLogOnFail | : true to log only if the command fails |
Definition at line 49 of file phoenix_system.cpp.
References phoenix_popen(), and PPath::saveFileContent().
Execute the given command and returns the output of this command.
command | : command to be executed |
Definition at line 19 of file phoenix_system.cpp.
References phoenix_getFileContent().
Referenced by checkOptionCompletion(), PPath::getCurrentNodeName(), phoenix_popen(), and testPhoenixPOpen().
Execute the given command and returns the output of this command.
[out] | executionLog | : output of the given command, empty string if the command is empty or null character on fail |
command | : command to be executed |
Definition at line 33 of file phoenix_system.cpp.
References phoenix_getFileContent().
PString phoenix_whoami | ( | ) |
Get the name of the current user.
Definition at line 122 of file phoenix_system.cpp.
Referenced by testPhoenixWhoAmI().