GNU Octave  8.1.0
A high-level interpreted language, primarily intended for numerical computations, mostly compatible with Matlab
file-ops.h File Reference
#include "octave-config.h"
#include <string>
#include <sys/types.h>
#include "str-vec.h"
Include dependency graph for file-ops.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Typedefs

typedef std::string(* tilde_expansion_hook) (const std::string &)
 

Functions

OCTAVE_API std::string canonicalize_file_name (const std::string &)
 
OCTAVE_API std::string canonicalize_file_name (const std::string &, std::string &)
 
OCTAVE_API std::string concat (const std::string &, const std::string &)
 
OCTAVE_API char dev_sep_char (void)
 
OCTAVE_API char dir_sep_char (void)
 
OCTAVE_API std::string dir_sep_chars (void)
 
OCTAVE_API std::string dir_sep_str (void)
 
OCTAVE_API std::string dirname (const std::string &path)
 
OCTAVE_API bool is_dev_sep (char c)
 
OCTAVE_API bool is_dir_sep (char c)
 
OCTAVE_API int link (const std::string &, const std::string &)
 
OCTAVE_API int link (const std::string &, const std::string &, std::string &)
 
OCTAVE_API int mkdir (const std::string &, mode_t)
 
OCTAVE_API int mkdir (const std::string &, mode_t, std::string &)
 
OCTAVE_API int mkfifo (const std::string &, mode_t)
 
OCTAVE_API int mkfifo (const std::string &, mode_t, std::string &)
 
OCTAVE_API std::string native_separator_path (const std::string &path)
 
OCTAVE_API int readlink (const std::string &, std::string &)
 
OCTAVE_API int readlink (const std::string &, std::string &, std::string &)
 
OCTAVE_API int recursive_mkdir (const std::string &name, mode_t mode)
 
OCTAVE_API int recursive_mkdir (const std::string &name, mode_t mode, std::string &msg)
 
OCTAVE_API int recursive_rmdir (const std::string &)
 
OCTAVE_API int recursive_rmdir (const std::string &, std::string &)
 
OCTAVE_API int rename (const std::string &, const std::string &)
 
OCTAVE_API int rename (const std::string &, const std::string &, std::string &)
 
OCTAVE_API int rmdir (const std::string &)
 
OCTAVE_API int rmdir (const std::string &, std::string &)
 
OCTAVE_API int symlink (const std::string &, const std::string &)
 
OCTAVE_API int symlink (const std::string &, const std::string &, std::string &)
 
OCTAVE_API std::string tail (const std::string &path)
 
OCTAVE_API std::string tempnam (const std::string &, const std::string &)
 
OCTAVE_API std::string tempnam (const std::string &, const std::string &, std::string &)
 
OCTAVE_API std::string tilde_expand (const std::string &)
 
OCTAVE_API string_vector tilde_expand (const string_vector &)
 
OCTAVE_API int umask (mode_t)
 
OCTAVE_API int unlink (const std::string &)
 
OCTAVE_API int unlink (const std::string &, std::string &)
 

Variables

OCTAVE_API string_vector tilde_additional_prefixes
 
OCTAVE_API string_vector tilde_additional_suffixes
 
OCTAVE_API tilde_expansion_hook tilde_expansion_failure_hook
 
OCTAVE_API tilde_expansion_hook tilde_expansion_preexpansion_hook
 

Typedef Documentation

◆ tilde_expansion_hook

typedef std::string(* tilde_expansion_hook) (const std::string &)

Definition at line 43 of file file-ops.h.

Function Documentation

◆ canonicalize_file_name() [1/2]

◆ canonicalize_file_name() [2/2]

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

◆ concat()

OCTAVE_API std::string concat ( const std::string &  dir,
const std::string &  file 
)

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

References dir_sep_char(), and is_dir_sep().

◆ dev_sep_char()

OCTAVE_API char dev_sep_char ( void  )

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

Referenced by is_dev_sep().

◆ dir_sep_char()

OCTAVE_API char dir_sep_char ( void  )

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

Referenced by concat(), native_separator_path(), and tempnam().

◆ dir_sep_chars()

OCTAVE_API std::string dir_sep_chars ( void  )

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

References dir_sep_str().

Referenced by canonicalize_file_name(), dirname(), is_dir_sep(), recursive_mkdir(), and tail().

◆ dir_sep_str()

◆ dirname()

◆ is_dev_sep()

OCTAVE_API bool is_dev_sep ( char  c)

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

References dev_sep_char().

◆ is_dir_sep()

OCTAVE_API bool is_dir_sep ( char  c)

◆ link() [1/2]

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

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

Referenced by documentation::documentation(), Flink(), and octave_link_wrapper().

◆ link() [2/2]

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

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

References octave_link_wrapper().

◆ mkdir() [1/2]

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

◆ mkdir() [2/2]

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

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

References octave_mkdir_wrapper().

◆ mkfifo() [1/2]

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

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

Referenced by Fmkfifo(), and octave_mkfifo_wrapper().

◆ mkfifo() [2/2]

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

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

References octave_mkfifo_wrapper().

◆ native_separator_path()

OCTAVE_API std::string native_separator_path ( const std::string &  path)

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

References dir_sep_char(), and n.

Referenced by F__fltk_uigetfile__().

◆ readlink() [1/2]

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

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

Referenced by Freadlink().

◆ readlink() [2/2]

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

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

References free(), and octave_areadlink_wrapper().

◆ recursive_mkdir() [1/2]

OCTAVE_API int recursive_mkdir ( const std::string &  name,
mode_t  mode 
)

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

◆ recursive_mkdir() [2/2]

OCTAVE_API int recursive_mkdir ( const std::string &  name,
mode_t  mode,
std::string &  msg 
)

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

References dir_sep_chars(), is_dir_sep(), and mkdir().

◆ recursive_rmdir() [1/2]

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

◆ recursive_rmdir() [2/2]

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

◆ rename() [1/2]

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

◆ rename() [2/2]

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

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

References rename(), and u8_to_wstring().

◆ rmdir() [1/2]

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

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

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

◆ rmdir() [2/2]

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

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

References octave_rmdir_wrapper().

◆ symlink() [1/2]

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

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

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

◆ symlink() [2/2]

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

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

References octave_symlink_wrapper().

◆ tail()

OCTAVE_API std::string tail ( const std::string &  path)

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

References dir_sep_chars().

Referenced by bp_file_info::bp_file_info().

◆ tempnam() [1/2]

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

◆ tempnam() [2/2]

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

◆ tilde_expand() [1/2]

◆ tilde_expand() [2/2]

OCTAVE_API string_vector tilde_expand ( const string_vector names)

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

References n, string_vector::numel(), and tilde_expand().

◆ umask()

OCTAVE_API int umask ( mode_t  mode)

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

References octave_umask_wrapper().

Referenced by Fumask(), and octave_umask_wrapper().

◆ unlink() [1/2]

◆ unlink() [2/2]

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

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

References octave_unlink_wrapper().

Variable Documentation

◆ tilde_additional_prefixes

OCTAVE_API string_vector tilde_additional_prefixes
extern

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

Referenced by tilde_find_prefix().

◆ tilde_additional_suffixes

OCTAVE_API string_vector tilde_additional_suffixes
extern

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

Referenced by tilde_find_suffix().

◆ tilde_expansion_failure_hook

OCTAVE_API tilde_expansion_hook tilde_expansion_failure_hook
extern

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

Referenced by tilde_expand_word().

◆ tilde_expansion_preexpansion_hook

OCTAVE_API tilde_expansion_hook tilde_expansion_preexpansion_hook
extern

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

Referenced by tilde_expand_word().