GNU Octave  4.2.1
A high-level interpreted language, primarily intended for numerical computations, mostly compatible with Matlab
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
Classes | Functions | Variables
octave::sys Namespace Reference

Classes

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

Functions

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 &argv)
 
int execvp (const std::string &file, const string_vector &args, std::string &msg)
 
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)
 
pid_t fork (std::string &msg)
 
std::string getcwd (void)
 
gid_t getegid (void)
 
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)
 
static std::string isolate_tilde_prefix (const std::string &fname)
 
int kill (pid_t pid, int sig)
 
int kill (pid_t pid, int sig, std::string &msg)
 
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 &nm, mode_t md)
 
int mkdir (const std::string &name, mode_t mode, std::string &msg)
 
int mkfifo (const std::string &nm, mode_t md)
 
int mkfifo (const std::string &name, mode_t mode, std::string &msg)
 
bool operator!= (const time &t1, const time &t2)
 
time 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)
 
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)
 
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)
 
static std::string tilde_expand_word (const std::string &filename)
 
static size_t tilde_find_prefix (const std::string &s, size_t &len)
 
static size_t tilde_find_suffix (const std::string &s)
 
int umask (mode_t mode)
 
int unlink (const std::string &name)
 
int unlink (const std::string &name, std::string &msg)
 
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)
 

Variables

static const char * default_prefixes [] = { " ~", "\t~", ":~", 0 }
 
static const char * default_suffixes [] = { " ", "\n", ":", 0 }
 

Function Documentation

OCTAVE_API std::string octave::sys::canonicalize_file_name ( const std::string name)

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

References string.

Referenced by file_editor_tab::exit_debug_and_clear(), and octave_canonicalize_file_name_wrapper().

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

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

References free(), octave_canonicalize_file_name_wrapper(), replace(), retval, string, and tmp.

int octave::sys::chdir ( const std::string path_arg)
OCTAVE_API int octave::sys::dup2 ( int  old_fd,
int  new_fd 
)
OCTAVE_API int octave::sys::dup2 ( int  old_fd,
int  new_fd,
std::string msg 
)

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

References octave_dup2_wrapper().

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

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

References string.

Referenced by octave_execvp_wrapper(), and octave_popen2().

OCTAVE_API int octave::sys::execvp ( const std::string file,
const string_vector args,
std::string msg 
)
OCTAVE_API int octave::sys::fcntl ( int  fd,
int  cmd,
long  arg 
)

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

References string.

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

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

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

References octave_fcntl_wrapper().

bool octave::sys::fnmatch ( const string_vector pat,
const std::string str,
int  fnm_flags 
)
OCTAVE_API pid_t octave::sys::fork ( std::string msg)
std::string octave::sys::getcwd ( void  )

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

References free(), octave_getcwd_wrapper(), retval, string, and tmp.

Referenced by octave::sys::env::do_getcwd(), and octave_getcwd_wrapper().

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

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

References octave_getegid_wrapper().

Referenced by octave_getegid_wrapper().

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

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

References octave_geteuid_wrapper().

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

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

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

References octave_getgid_wrapper().

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

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

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

References octave_getpgrp_wrapper().

Referenced by octave_getpgrp_wrapper().

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

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

References octave_getpid_wrapper().

Referenced by octave_getpid_wrapper().

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

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

References octave_getppid_wrapper().

Referenced by octave_getppid_wrapper().

OCTAVE_API uid_t octave::sys::getuid ( void  )
string_vector octave::sys::glob ( const string_vector pat)
static std::string octave::sys::isolate_tilde_prefix ( const std::string fname)
static

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

References octave::sys::file_ops::is_dir_sep().

Referenced by tilde_expand_word().

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

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

References string.

Referenced by octave_kill_wrapper().

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

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

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

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

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

References string.

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

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

References octave_link_wrapper().

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

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

References string.

Referenced by octave::base_url_transfer::mget_directory(), and octave::xzip().

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

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

References mode, and octave_mkdir_wrapper().

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

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

References string.

Referenced by octave_mkfifo_wrapper().

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

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

References mode, and octave_mkfifo_wrapper().

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

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

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

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

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

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

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

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

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

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

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

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

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

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().

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

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

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

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

References string.

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

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

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

References octave_pipe_wrapper().

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

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

References string.

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

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

References string.

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

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

References free(), and octave_areadlink_wrapper().

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

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

References string.

Referenced by recursive_rmdir().

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

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

References string.

Referenced by workspace_view::contextmenu_requested().

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

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

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

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

References string.

Referenced by octave_rmdir_wrapper(), and recursive_rmdir().

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

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

References octave_rmdir_wrapper().

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

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

References string.

Referenced by octave_symlink_wrapper().

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

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

References octave_symlink_wrapper().

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

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

References string.

Referenced by QtHandles::Figure::copy_figure_callback(), and mk_tmp_hist_file().

OCTAVE_API std::string octave::sys::tempnam ( const std::string dir,
const std::string pfx,
std::string msg 
)
static std::string octave::sys::tilde_expand_word ( const std::string filename)
static
static size_t octave::sys::tilde_find_prefix ( const std::string s,
size_t len 
)
static
static size_t octave::sys::tilde_find_suffix ( const std::string s)
static
OCTAVE_API int octave::sys::umask ( mode_t  mode)

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

References octave_umask_wrapper().

Referenced by octave_umask_wrapper().

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

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

References octave_unlink_wrapper().

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

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

References string.

Referenced by octave_procbuf::close(), and octave::child_list::child_list_rep::wait().

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

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

References octave_waitpid_wrapper(), and retval.

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

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

References octave_wcontinue_wrapper().

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

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

References octave_wcoredump_wrapper().

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

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

References octave_wexitstatus_wrapper().

Referenced by run_command_and_return_output().

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

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

References octave_wifcontinued_wrapper().

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

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

References octave_wifexited_wrapper().

Referenced by pager_event_handler(), and run_command_and_return_output().

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

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

References octave_wifsignaled_wrapper().

Referenced by pager_event_handler().

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

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

References octave_wifstopped_wrapper().

string_vector octave::sys::windows_glob ( const string_vector pat)
OCTAVE_API int octave::sys::wnohang ( void  )

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

References octave_wnohang_wrapper().

Referenced by octave::child_list::child_list_rep::wait().

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

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

References octave_wstopsig_wrapper().

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

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

References octave_wtermsig_wrapper().

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

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

References octave_wuntraced_wrapper().

Variable Documentation

const char* octave::sys::default_prefixes[] = { " ~", "\t~", ":~", 0 }
static

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

const char* octave::sys::default_suffixes[] = { " ", "\n", ":", 0 }
static

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