GNU Octave  6.2.0
A high-level interpreted language, primarily intended for numerical computations, mostly compatible with Matlab
octave::sys Namespace Reference

Namespaces

 file_ops
 

Classes

class  base_file_stat
 
class  base_tm
 
class  cpu_time
 
class  dir_entry
 
class  env
 
class  file_fstat
 
class  file_stat
 
class  gmtime
 
class  group
 
class  localtime
 
class  password
 
class  resource_usage
 
class  strptime
 
class  time
 
class  uname
 

Functions

std::string blas_version (void)
 
std::string canonicalize_file_name (const std::string &name)
 
std::string canonicalize_file_name (const std::string &name, std::string &msg)
 
int chdir (const std::string &path_arg)
 
int dup2 (int old_fd, int new_fd)
 
int dup2 (int old_fd, int new_fd, std::string &msg)
 
int execvp (const std::string &file, const string_vector &args, std::string &msg)
 
int execvp (const std::string &file, const string_vector &argv)
 
int fcntl (int fd, int cmd, long arg)
 
int fcntl (int fd, int cmd, long arg, std::string &msg)
 
bool fnmatch (const string_vector &pat, const std::string &str, int fnm_flags)
 
std::FILE * fopen (const std::string &filename, const std::string &mode)
 
pid_t fork (std::string &msg)
 
std::fstream fstream (const std::string &filename, const std::ios::openmode mode)
 
std::string get_ASCII_filename (const std::string &orig_file_name)
 
bool get_dirlist (const std::string &dirname, string_vector &dirlist, std::string &msg)
 
std::string getcwd (void)
 
gid_t getegid (void)
 
std::string getenv_wrapper (const std::string &name)
 
uid_t geteuid (void)
 
gid_t getgid (void)
 
pid_t getpgrp (std::string &msg)
 
pid_t getpid (void)
 
pid_t getppid (void)
 
uid_t getuid (void)
 
string_vector glob (const string_vector &pat)
 
std::ifstream ifstream (const std::string &filename, const std::ios::openmode mode)
 
int kill (pid_t pid, int sig)
 
int kill (pid_t pid, int sig, std::string &msg)
 
std::string lapack_version (void)
 
int link (const std::string &old_name, const std::string &new_name)
 
int link (const std::string &old_name, const std::string &new_name, std::string &msg)
 
int mkdir (const std::string &name, mode_t mode, std::string &msg)
 
int mkdir (const std::string &nm, mode_t md)
 
int mkfifo (const std::string &name, mode_t mode, std::string &msg)
 
int mkfifo (const std::string &nm, mode_t md)
 
std::ofstream ofstream (const std::string &filename, const std::ios::openmode mode)
 
bool operator!= (const time &t1, const time &t2)
 
time operator+ (const time &t1, const time &t2)
 
bool operator< (const time &t1, const time &t2)
 
std::ostream & operator<< (std::ostream &os, const time &ot)
 
bool operator<= (const time &t1, const time &t2)
 
bool operator== (const time &t1, const time &t2)
 
bool operator> (const time &t1, const time &t2)
 
bool operator>= (const time &t1, const time &t2)
 
int pipe (int *fildes)
 
int pipe (int *fildes, std::string &msg)
 
pid_t popen2 (const std::string &cmd, const string_vector &args, bool sync_mode, int *fildes)
 
pid_t popen2 (const std::string &cmd, const string_vector &args, bool sync_mode, int *fildes, std::string &msg)
 
void putenv_wrapper (const std::string &name, const std::string &value)
 
int readlink (const std::string &path, std::string &result)
 
int readlink (const std::string &path, std::string &result, std::string &msg)
 
int recursive_rmdir (const std::string &name)
 
int recursive_rmdir (const std::string &name, std::string &msg)
 
int rename (const std::string &from, const std::string &to)
 
int rename (const std::string &from, const std::string &to, std::string &msg)
 
int rmdir (const std::string &name)
 
int rmdir (const std::string &name, std::string &msg)
 
int symlink (const std::string &old_name, const std::string &new_name)
 
int symlink (const std::string &old_name, const std::string &new_name, std::string &msg)
 
std::string tempnam (const std::string &dir, const std::string &pfx)
 
std::string tempnam (const std::string &dir, const std::string &pfx, std::string &msg)
 
std::string u8_from_wstring (const std::wstring &wchar_string)
 
std::wstring u8_to_wstring (const std::string &utf8_string)
 
int umask (mode_t mode)
 
int unlink (const std::string &name)
 
int unlink (const std::string &name, std::string &msg)
 
int unsetenv_wrapper (const std::string &name)
 
pid_t vfork (std::string &msg)
 
pid_t waitpid (pid_t pid, int *status, int options)
 
pid_t waitpid (pid_t pid, int *status, int options, std::string &msg)
 
int wcontinue (void)
 
int wcoredump (int status)
 
int wexitstatus (int status)
 
bool wifcontinued (int status)
 
bool wifexited (int status)
 
bool wifsignaled (int status)
 
bool wifstopped (int status)
 
string_vector windows_glob (const string_vector &pat)
 
int wnohang (void)
 
int wstopsig (int status)
 
int wtermsig (int status)
 
int wuntraced (void)
 

Function Documentation

◆ blas_version()

std::string octave::sys::blas_version ( void  )

Definition at line 45 of file lo-sysinfo.cc.

References len, retval, and octave::dynamic_library::search().

Referenced by F__blas_version__().

◆ canonicalize_file_name() [1/2]

◆ canonicalize_file_name() [2/2]

OCTAVE_API std::string octave::sys::canonicalize_file_name ( const std::string &  name,
std::string &  msg 
)

◆ chdir()

int octave::sys::chdir ( const std::string &  path_arg)

◆ dup2() [1/2]

OCTAVE_API int octave::sys::dup2 ( int  old_fd,
int  new_fd 
)

◆ dup2() [2/2]

OCTAVE_API int octave::sys::dup2 ( int  old_fd,
int  new_fd,
std::string &  msg 
)

Definition at line 60 of file oct-syscalls.cc.

References octave_dup2_wrapper().

◆ execvp() [1/2]

OCTAVE_API int octave::sys::execvp ( const std::string &  file,
const string_vector args,
std::string &  msg 
)

◆ execvp() [2/2]

OCTAVE_API int octave::sys::execvp ( const std::string &  file,
const string_vector argv 
)

Definition at line 75 of file oct-syscalls.cc.

Referenced by Fexec(), octave_execvp_wrapper(), and octave_popen2().

◆ fcntl() [1/2]

OCTAVE_API int octave::sys::fcntl ( int  fd,
int  cmd,
long  arg 
)

Definition at line 349 of file oct-syscalls.cc.

Referenced by KPty::close(), Ffcntl(), octave_fcntl_wrapper(), octave_popen2(), and KPty::open().

◆ fcntl() [2/2]

OCTAVE_API int octave::sys::fcntl ( int  fd,
int  cmd,
long  arg,
std::string &  msg 
)

Definition at line 356 of file oct-syscalls.cc.

References octave_fcntl_wrapper().

◆ fnmatch()

bool octave::sys::fnmatch ( const string_vector pat,
const std::string &  str,
int  fnm_flags 
)

◆ fopen()

std::FILE * octave::sys::fopen ( const std::string &  filename,
const std::string &  mode 
)

◆ fork()

OCTAVE_API pid_t octave::sys::fork ( std::string &  msg)

◆ fstream()

std::fstream octave::sys::fstream ( const std::string &  filename,
const std::ios::openmode  mode 
)

Definition at line 367 of file lo-sysdep.cc.

References u8_to_wstring().

Referenced by octave::history_system::do_edit_history().

◆ get_ASCII_filename()

◆ get_dirlist()

◆ getcwd()

std::string octave::sys::getcwd ( void  )

◆ getegid()

OCTAVE_API gid_t octave::sys::getegid ( void  )

Definition at line 168 of file oct-syscalls.cc.

References octave_getegid_wrapper().

Referenced by Fgetegid(), and octave_getegid_wrapper().

◆ getenv_wrapper()

std::string octave::sys::getenv_wrapper ( const std::string &  name)

Definition at line 442 of file lo-sysdep.cc.

References name, u8_from_wstring(), and u8_to_wstring().

Referenced by octave::sys::env::do_getenv().

◆ geteuid()

OCTAVE_API uid_t octave::sys::geteuid ( void  )

Definition at line 180 of file oct-syscalls.cc.

References octave_geteuid_wrapper().

Referenced by KPty::close(), Fgeteuid(), octave_geteuid_wrapper(), and KPty::open().

◆ getgid()

OCTAVE_API gid_t octave::sys::getgid ( void  )

Definition at line 162 of file oct-syscalls.cc.

References octave_getgid_wrapper().

Referenced by KPty::close(), Fgetgid(), octave_getgid_wrapper(), and KPty::open().

◆ getpgrp()

OCTAVE_API pid_t octave::sys::getpgrp ( std::string &  msg)

Definition at line 139 of file oct-syscalls.cc.

References octave_getpgrp_wrapper().

Referenced by Fgetpgrp(), and octave_getpgrp_wrapper().

◆ getpid()

OCTAVE_API pid_t octave::sys::getpid ( void  )

Definition at line 150 of file oct-syscalls.cc.

References octave_getpid_wrapper().

Referenced by Fgetpid(), and octave_getpid_wrapper().

◆ getppid()

OCTAVE_API pid_t octave::sys::getppid ( void  )

Definition at line 156 of file oct-syscalls.cc.

References octave_getppid_wrapper().

Referenced by Fgetppid(), and octave_getppid_wrapper().

◆ getuid()

OCTAVE_API uid_t octave::sys::getuid ( void  )

◆ glob()

◆ ifstream()

◆ kill() [1/2]

OCTAVE_API int octave::sys::kill ( pid_t  pid,
int  sig 
)

Definition at line 296 of file oct-syscalls.cc.

Referenced by Fkill(), and octave_kill_wrapper().

◆ kill() [2/2]

OCTAVE_API int octave::sys::kill ( pid_t  pid,
int  sig,
std::string &  msg 
)

Definition at line 303 of file oct-syscalls.cc.

References NOT_SUPPORTED, octave_have_kill(), and octave_kill_wrapper().

◆ lapack_version()

std::string octave::sys::lapack_version ( void  )

Definition at line 163 of file lo-sysinfo.cc.

References F77_FUNC(), F77_RET_T(), retval, octave::dynamic_library::search(), and STRINGIZE.

Referenced by F__lapack_version__().

◆ link() [1/2]

OCTAVE_API int octave::sys::link ( const std::string &  old_name,
const std::string &  new_name 
)

Definition at line 440 of file file-ops.cc.

Referenced by Flink().

◆ link() [2/2]

OCTAVE_API int octave::sys::link ( const std::string &  old_name,
const std::string &  new_name,
std::string &  msg 
)

Definition at line 446 of file file-ops.cc.

References octave_link_wrapper().

◆ mkdir() [1/2]

OCTAVE_API int octave::sys::mkdir ( const std::string &  name,
mode_t  mode,
std::string &  msg 
)

Definition at line 410 of file file-ops.cc.

References name, and octave_mkdir_wrapper().

◆ mkdir() [2/2]

OCTAVE_API int octave::sys::mkdir ( const std::string &  nm,
mode_t  md 
)

◆ mkfifo() [1/2]

OCTAVE_API int octave::sys::mkfifo ( const std::string &  name,
mode_t  mode,
std::string &  msg 
)

Definition at line 428 of file file-ops.cc.

References name, and octave_mkfifo_wrapper().

◆ mkfifo() [2/2]

OCTAVE_API int octave::sys::mkfifo ( const std::string &  nm,
mode_t  md 
)

Definition at line 422 of file file-ops.cc.

Referenced by Fmkfifo(), and octave_mkfifo_wrapper().

◆ ofstream()

std::ofstream octave::sys::ofstream ( const std::string &  filename,
const std::ios::openmode  mode 
)

◆ operator!=()

bool octave::sys::operator!= ( const time t1,
const time t2 
)
inline

Definition at line 137 of file oct-time.h.

◆ operator+()

time octave::sys::operator+ ( const time t1,
const time t2 
)
inline

Definition at line 181 of file oct-time.h.

References octave::sys::time::unix_time(), and octave::sys::time::usec().

◆ operator<()

bool octave::sys::operator< ( const time t1,
const time t2 
)
inline

Definition at line 142 of file oct-time.h.

References octave::sys::time::unix_time(), and octave::sys::time::usec().

◆ operator<<()

std::ostream& octave::sys::operator<< ( std::ostream &  os,
const time ot 
)

Definition at line 97 of file oct-time.cc.

◆ operator<=()

bool octave::sys::operator<= ( const time t1,
const time t2 
)
inline

Definition at line 155 of file oct-time.h.

◆ operator==()

bool octave::sys::operator== ( const time t1,
const time t2 
)
inline

Definition at line 131 of file oct-time.h.

References octave::sys::time::unix_time(), and octave::sys::time::usec().

◆ operator>()

bool octave::sys::operator> ( const time t1,
const time t2 
)
inline

Definition at line 162 of file oct-time.h.

References octave::sys::time::unix_time(), and octave::sys::time::usec().

◆ operator>=()

bool octave::sys::operator>= ( const time t1,
const time t2 
)
inline

Definition at line 175 of file oct-time.h.

◆ pipe() [1/2]

OCTAVE_API int octave::sys::pipe ( int *  fildes)

Definition at line 186 of file oct-syscalls.cc.

Referenced by Fpipe(), octave_pipe_wrapper(), octave_popen2(), and octave_procbuf::open().

◆ pipe() [2/2]

OCTAVE_API int octave::sys::pipe ( int *  fildes,
std::string &  msg 
)

Definition at line 193 of file oct-syscalls.cc.

References octave_pipe_wrapper().

◆ popen2() [1/2]

OCTAVE_API pid_t octave::sys::popen2 ( const std::string &  cmd,
const string_vector args,
bool  sync_mode,
int *  fildes 
)

Definition at line 323 of file oct-syscalls.cc.

Referenced by Fpopen2().

◆ popen2() [2/2]

OCTAVE_API pid_t octave::sys::popen2 ( const std::string &  cmd,
const string_vector args,
bool  sync_mode,
int *  fildes,
std::string &  msg 
)

◆ putenv_wrapper()

void octave::sys::putenv_wrapper ( const std::string &  name,
const std::string &  value 
)

◆ readlink() [1/2]

OCTAVE_API int octave::sys::readlink ( const std::string &  path,
std::string &  result 
)

Definition at line 482 of file file-ops.cc.

References path.

Referenced by Freadlink().

◆ readlink() [2/2]

OCTAVE_API int octave::sys::readlink ( const std::string &  path,
std::string &  result,
std::string &  msg 
)

Definition at line 488 of file file-ops.cc.

References free(), octave_areadlink_wrapper(), and path.

◆ recursive_rmdir() [1/2]

OCTAVE_API int octave::sys::recursive_rmdir ( const std::string &  name)

Definition at line 557 of file file-ops.cc.

References name.

Referenced by octave::documentation::~documentation(), Frmdir(), and recursive_rmdir().

◆ recursive_rmdir() [2/2]

OCTAVE_API int octave::sys::recursive_rmdir ( const std::string &  name,
std::string &  msg 
)

◆ rename() [1/2]

OCTAVE_API int octave::sys::rename ( const std::string &  from,
const std::string &  to 
)

◆ rename() [2/2]

OCTAVE_API int octave::sys::rename ( const std::string &  from,
const std::string &  to,
std::string &  msg 
)

Definition at line 514 of file file-ops.cc.

References u8_to_wstring().

◆ rmdir() [1/2]

OCTAVE_API int octave::sys::rmdir ( const std::string &  name)

Definition at line 535 of file file-ops.cc.

References name.

Referenced by Frmdir(), octave_rmdir_wrapper(), and recursive_rmdir().

◆ rmdir() [2/2]

OCTAVE_API int octave::sys::rmdir ( const std::string &  name,
std::string &  msg 
)

Definition at line 541 of file file-ops.cc.

References name, and octave_rmdir_wrapper().

◆ symlink() [1/2]

OCTAVE_API int octave::sys::symlink ( const std::string &  old_name,
const std::string &  new_name 
)

Definition at line 461 of file file-ops.cc.

Referenced by Freadlink(), Fsymlink(), and octave_symlink_wrapper().

◆ symlink() [2/2]

OCTAVE_API int octave::sys::symlink ( const std::string &  old_name,
const std::string &  new_name,
std::string &  msg 
)

Definition at line 467 of file file-ops.cc.

References octave_symlink_wrapper().

◆ tempnam() [1/2]

OCTAVE_API std::string octave::sys::tempnam ( const std::string &  dir,
const std::string &  pfx 
)

◆ tempnam() [2/2]

OCTAVE_API std::string octave::sys::tempnam ( const std::string &  dir,
const std::string &  pfx,
std::string &  msg 
)

◆ u8_from_wstring()

std::string octave::sys::u8_from_wstring ( const std::wstring &  wchar_string)

◆ u8_to_wstring()

◆ umask()

OCTAVE_API int octave::sys::umask ( mode_t  mode)

Definition at line 621 of file file-ops.cc.

References octave_umask_wrapper().

Referenced by Fumask(), and octave_umask_wrapper().

◆ unlink() [1/2]

OCTAVE_API int octave::sys::unlink ( const std::string &  name)

◆ unlink() [2/2]

OCTAVE_API int octave::sys::unlink ( const std::string &  name,
std::string &  msg 
)

Definition at line 632 of file file-ops.cc.

References name, and octave_unlink_wrapper().

◆ unsetenv_wrapper()

int octave::sys::unsetenv_wrapper ( const std::string &  name)

Definition at line 455 of file lo-sysdep.cc.

References name, octave_unsetenv_wrapper(), putenv_wrapper(), and u8_to_wstring().

Referenced by Funsetenv().

◆ vfork()

OCTAVE_API pid_t octave::sys::vfork ( std::string &  msg)

◆ waitpid() [1/2]

OCTAVE_API pid_t octave::sys::waitpid ( pid_t  pid,
int *  status,
int  options 
)

◆ waitpid() [2/2]

OCTAVE_API pid_t octave::sys::waitpid ( pid_t  pid,
int *  status,
int  options,
std::string &  msg 
)

Definition at line 215 of file oct-syscalls.cc.

References octave_waitpid_wrapper(), and retval.

◆ wcontinue()

OCTAVE_API int octave::sys::wcontinue ( void  )

Definition at line 230 of file oct-syscalls.cc.

References octave_wcontinue_wrapper().

Referenced by FWCONTINUE().

◆ wcoredump()

OCTAVE_API int octave::sys::wcoredump ( int  status)

Definition at line 236 of file oct-syscalls.cc.

References octave_wcoredump_wrapper().

Referenced by FWCOREDUMP().

◆ wexitstatus()

OCTAVE_API int octave::sys::wexitstatus ( int  status)

◆ wifcontinued()

OCTAVE_API bool octave::sys::wifcontinued ( int  status)

Definition at line 242 of file oct-syscalls.cc.

References octave_wifcontinued_wrapper().

Referenced by FWIFCONTINUED().

◆ wifexited()

OCTAVE_API bool octave::sys::wifexited ( int  status)

◆ wifsignaled()

OCTAVE_API bool octave::sys::wifsignaled ( int  status)

Definition at line 254 of file oct-syscalls.cc.

References octave_wifsignaled_wrapper().

Referenced by FWIFSIGNALED(), and octave::pager_event_handler().

◆ wifstopped()

OCTAVE_API bool octave::sys::wifstopped ( int  status)

Definition at line 260 of file oct-syscalls.cc.

References octave_wifstopped_wrapper().

Referenced by FWIFSTOPPED().

◆ windows_glob()

◆ wnohang()

OCTAVE_API int octave::sys::wnohang ( void  )

Definition at line 272 of file oct-syscalls.cc.

References octave_wnohang_wrapper().

Referenced by FWNOHANG(), and octave::child_list::wait().

◆ wstopsig()

OCTAVE_API int octave::sys::wstopsig ( int  status)

Definition at line 278 of file oct-syscalls.cc.

References octave_wstopsig_wrapper().

Referenced by FWSTOPSIG().

◆ wtermsig()

OCTAVE_API int octave::sys::wtermsig ( int  status)

Definition at line 284 of file oct-syscalls.cc.

References octave_wtermsig_wrapper().

Referenced by FWTERMSIG().

◆ wuntraced()

OCTAVE_API int octave::sys::wuntraced ( void  )

Definition at line 290 of file oct-syscalls.cc.

References octave_wuntraced_wrapper().

Referenced by FWUNTRACED().