GNU Octave 10.1.0
A high-level interpreted language, primarily intended for numerical computations, mostly compatible with Matlab
 
Loading...
Searching...
No Matches
file-ops.h File Reference
#include "octave-config.h"
#include <string>
#include <sys/types.h>
#include "str-vec.h"

Go to the source code of this file.

Typedefs

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

Functions

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

Variables

string_vector tilde_additional_prefixes
 
string_vector tilde_additional_suffixes
 
tilde_expansion_hook tilde_expansion_failure_hook
 
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]

std::string canonicalize_file_name ( const std::string &  name)
extern

◆ canonicalize_file_name() [2/2]

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

◆ concat()

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

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

References dir_sep_char(), string_vector::empty(), and is_dir_sep().

◆ dev_sep_char()

char dev_sep_char ( )
extern

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

Referenced by is_dev_sep().

◆ dir_sep_char()

char dir_sep_char ( )
extern

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

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

◆ dir_sep_chars()

std::string dir_sep_chars ( )
extern

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

References dir_sep_str().

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

◆ dir_sep_str()

std::string dir_sep_str ( )
extern

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

Referenced by dir_sep_chars().

◆ dirname()

std::string dirname ( const std::string &  path)
extern

◆ is_dev_sep()

bool is_dev_sep ( char  c)
extern

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

References dev_sep_char().

◆ is_dir_sep()

bool is_dir_sep ( char  c)
extern

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

References dir_sep_chars().

Referenced by concat().

◆ link() [1/2]

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

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

References link().

Referenced by link(), and octave_link_wrapper().

◆ link() [2/2]

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

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

References octave_link_wrapper().

◆ mkdir() [1/2]

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

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

References mkdir().

Referenced by mkdir(), octave_mkdir_wrapper(), and recursive_mkdir().

◆ mkdir() [2/2]

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

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

References octave_mkdir_wrapper().

◆ mkfifo() [1/2]

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

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

References mkfifo().

Referenced by mkfifo(), and octave_mkfifo_wrapper().

◆ mkfifo() [2/2]

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

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

References octave_mkfifo_wrapper().

◆ native_separator_path()

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

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

References dir_sep_char().

◆ readlink() [1/2]

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

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

References readlink().

Referenced by readlink().

◆ readlink() [2/2]

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

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

References free(), and octave_areadlink_wrapper().

◆ recursive_mkdir() [1/2]

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

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

References recursive_mkdir().

Referenced by recursive_mkdir().

◆ recursive_mkdir() [2/2]

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

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

References mkdir().

◆ recursive_rmdir() [1/2]

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

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

References recursive_rmdir().

Referenced by recursive_rmdir(), and recursive_rmdir().

◆ recursive_rmdir() [2/2]

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

◆ rename() [1/2]

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

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

References rename().

Referenced by rename().

◆ rename() [2/2]

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

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

References file_exists(), same_file(), u8_to_wstring(), and unlink().

◆ rmdir() [1/2]

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

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

References rmdir().

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

◆ rmdir() [2/2]

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

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

References octave_rmdir_wrapper().

◆ symlink() [1/2]

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

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

References symlink().

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

◆ symlink() [2/2]

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

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

References octave_symlink_wrapper().

◆ tail()

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

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

References dir_sep_chars().

◆ tempnam() [1/2]

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

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

References tempnam().

Referenced by tempnam().

◆ tempnam() [2/2]

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

◆ tilde_expand() [1/2]

std::string tilde_expand ( const std::string &  name)
extern

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

References len.

Referenced by tilde_expand().

◆ tilde_expand() [2/2]

string_vector tilde_expand ( const string_vector names)
extern

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

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

◆ umask()

int umask ( mode_t  mode)
extern

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

References octave_umask_wrapper().

Referenced by octave_umask_wrapper().

◆ unlink() [1/2]

int unlink ( const std::string &  name)
extern

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

References unlink().

Referenced by octave_unlink_wrapper(), recursive_rmdir(), rename(), and unlink().

◆ unlink() [2/2]

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

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

References octave_unlink_wrapper().

Variable Documentation

◆ tilde_additional_prefixes

string_vector tilde_additional_prefixes
extern

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

◆ tilde_additional_suffixes

string_vector tilde_additional_suffixes
extern

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

◆ tilde_expansion_failure_hook

tilde_expansion_hook tilde_expansion_failure_hook
extern

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

◆ tilde_expansion_preexpansion_hook

tilde_expansion_hook tilde_expansion_preexpansion_hook
extern

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