GNU Octave
4.0.0
A high-level interpreted language, primarily intended for numerical computations, mostly compatible with Matlab
|
#include <cerrno>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <iostream>
#include <vector>
#include <sys/stat.h>
#include <sys/types.h>
#include <unistd.h>
#include "pathmax.h"
#include "canonicalize.h"
#include <tempname.h>
#include "dir-ops.h"
#include "file-ops.h"
#include "file-stat.h"
#include "oct-env.h"
#include "oct-locbuf.h"
#include "oct-passwd.h"
#include "pathlen.h"
#include "quit.h"
#include "singleton-cleanup.h"
#include "str-vec.h"
Go to the source code of this file.
Functions | |
static std::string | isolate_tilde_prefix (const std::string &fname) |
std::string | octave_canonicalize_file_name (const std::string &name) |
std::string | octave_canonicalize_file_name (const std::string &name, std::string &msg) |
int | octave_link (const std::string &old_name, const std::string &new_name) |
int | octave_link (const std::string &old_name, const std::string &new_name, std::string &msg) |
int | octave_mkdir (const std::string &nm, mode_t md) |
int | octave_mkdir (const std::string &name, mode_t mode, std::string &msg) |
int | octave_mkfifo (const std::string &nm, mode_t md) |
int | octave_mkfifo (const std::string &name, mode_t mode, std::string &msg) |
int | octave_readlink (const std::string &path, std::string &result) |
int | octave_readlink (const std::string &path, std::string &result, std::string &msg) |
int | octave_recursive_rmdir (const std::string &name) |
int | octave_recursive_rmdir (const std::string &name, std::string &msg) |
int | octave_rename (const std::string &from, const std::string &to) |
int | octave_rename (const std::string &from, const std::string &to, std::string &msg) |
int | octave_rmdir (const std::string &name) |
int | octave_rmdir (const std::string &name, std::string &msg) |
int | octave_symlink (const std::string &old_name, const std::string &new_name) |
int | octave_symlink (const std::string &old_name, const std::string &new_name, std::string &msg) |
std::string | octave_tempnam (const std::string &dir, const std::string &pfx) |
std::string | octave_tempnam (const std::string &dir, const std::string &pfx, std::string &msg) |
int | octave_umask (mode_t mode) |
int | octave_unlink (const std::string &name) |
int | octave_unlink (const std::string &name, 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) |
Variables | |
static const char * | default_prefixes [] = { " ~", "\t~", ":~", 0 } |
static const char * | default_suffixes [] = { " ", "\n", ":", 0 } |
|
static |
Definition at line 206 of file file-ops.cc.
References file_ops::is_dir_sep().
Referenced by tilde_expand_word().
std::string octave_canonicalize_file_name | ( | const std::string & | name | ) |
Definition at line 720 of file file-ops.cc.
References octave_canonicalize_file_name().
Referenced by Fcanonicalize_file_name(), and octave_canonicalize_file_name().
std::string octave_canonicalize_file_name | ( | const std::string & | name, |
std::string & | msg | ||
) |
Definition at line 727 of file file-ops.cc.
References free().
int octave_link | ( | const std::string & | old_name, |
const std::string & | new_name | ||
) |
Definition at line 440 of file file-ops.cc.
References octave_link().
Referenced by Flink(), and octave_link().
int octave_link | ( | const std::string & | old_name, |
const std::string & | new_name, | ||
std::string & | msg | ||
) |
Definition at line 447 of file file-ops.cc.
References link().
Definition at line 392 of file file-ops.cc.
References octave_mkdir().
Referenced by Fmkdir(), base_url_transfer::mget_directory(), and octave_mkdir().
Definition at line 399 of file file-ops.cc.
Definition at line 414 of file file-ops.cc.
References octave_mkfifo().
Referenced by Fmkfifo(), and octave_mkfifo().
Definition at line 421 of file file-ops.cc.
int octave_readlink | ( | const std::string & | path, |
std::string & | result | ||
) |
Definition at line 486 of file file-ops.cc.
References octave_readlink().
Referenced by Freadlink(), and octave_readlink().
int octave_readlink | ( | const std::string & | path, |
std::string & | result, | ||
std::string & | msg | ||
) |
Definition at line 493 of file file-ops.cc.
References MAXPATHLEN.
int octave_recursive_rmdir | ( | const std::string & | name | ) |
Definition at line 564 of file file-ops.cc.
References octave_recursive_rmdir().
Referenced by Frmdir(), and octave_recursive_rmdir().
int octave_recursive_rmdir | ( | const std::string & | name, |
std::string & | msg | ||
) |
Definition at line 571 of file file-ops.cc.
References dir_entry::close(), file_ops::dir_sep_str(), dir_entry::error(), base_file_stat::error(), base_file_stat::is_dir(), Array< T >::length(), octave_recursive_rmdir(), octave_rmdir(), octave_unlink(), and dir_entry::read().
int octave_rename | ( | const std::string & | from, |
const std::string & | to | ||
) |
Definition at line 517 of file file-ops.cc.
References octave_rename().
Referenced by Frename(), and octave_rename().
int octave_rename | ( | const std::string & | from, |
const std::string & | to, | ||
std::string & | msg | ||
) |
Definition at line 524 of file file-ops.cc.
int octave_rmdir | ( | const std::string & | name | ) |
Definition at line 540 of file file-ops.cc.
References octave_rmdir().
Referenced by Frmdir(), octave_recursive_rmdir(), and octave_rmdir().
int octave_rmdir | ( | const std::string & | name, |
std::string & | msg | ||
) |
Definition at line 547 of file file-ops.cc.
int octave_symlink | ( | const std::string & | old_name, |
const std::string & | new_name | ||
) |
Definition at line 463 of file file-ops.cc.
References octave_symlink().
Referenced by Fsymlink(), and octave_symlink().
int octave_symlink | ( | const std::string & | old_name, |
const std::string & | new_name, | ||
std::string & | msg | ||
) |
Definition at line 470 of file file-ops.cc.
std::string octave_tempnam | ( | const std::string & | dir, |
const std::string & | pfx | ||
) |
Definition at line 671 of file file-ops.cc.
References octave_tempnam().
Referenced by QtHandles::Figure::copy_figure_callback(), Ftempname(), mk_tmp_hist_file(), and octave_tempnam().
std::string octave_tempnam | ( | const std::string & | dir, |
const std::string & | pfx, | ||
std::string & | msg | ||
) |
Definition at line 678 of file file-ops.cc.
References file_ops::dir_sep_char(), octave_env::get_temp_directory(), and base_file_stat::is_dir().
Definition at line 639 of file file-ops.cc.
Referenced by Fumask().
int octave_unlink | ( | const std::string & | name | ) |
Definition at line 649 of file file-ops.cc.
References octave_unlink().
Referenced by base_url_transfer::delete_file(), delete_file(), Funlink(), octave_recursive_rmdir(), and octave_unlink().
int octave_unlink | ( | const std::string & | name, |
std::string & | msg | ||
) |
Definition at line 656 of file file-ops.cc.
|
static |
Definition at line 222 of file file-ops.cc.
References octave_passwd::dir(), octave_env::get_home_directory(), octave_passwd::getpwnam(), file_ops::is_dir_sep(), isolate_tilde_prefix(), file_ops::tilde_expansion_failure_hook, and file_ops::tilde_expansion_preexpansion_hook.
Referenced by file_ops::tilde_expand().
Definition at line 140 of file file-ops.cc.
References string_vector::empty(), Array< T >::length(), and file_ops::tilde_additional_prefixes.
Referenced by file_ops::tilde_expand().
|
static |
Definition at line 175 of file file-ops.cc.
References string_vector::empty(), file_ops::is_dir_sep(), Array< T >::length(), and file_ops::tilde_additional_suffixes.
Referenced by file_ops::tilde_expand().
|
static |
Definition at line 103 of file file-ops.cc.
|
static |
Definition at line 108 of file file-ops.cc.