GNU Octave
3.8.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 "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 202 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 679 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 686 of file file-ops.cc.
References octave_env::make_absolute(), OCTAVE_LOCAL_BUFFER, and PATH_MAX.
int octave_link | ( | const std::string & | old_name, |
const std::string & | new_name | ||
) |
Definition at line 415 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 422 of file file-ops.cc.
References link().
Definition at line 367 of file file-ops.cc.
References octave_mkdir().
Referenced by Fmkdir(), base_url_transfer::mget_directory(), and octave_mkdir().
Definition at line 374 of file file-ops.cc.
Definition at line 389 of file file-ops.cc.
References octave_mkfifo().
Referenced by Fmkfifo(), and octave_mkfifo().
Definition at line 396 of file file-ops.cc.
int octave_readlink | ( | const std::string & | path, |
std::string & | result | ||
) |
Definition at line 461 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 468 of file file-ops.cc.
References MAXPATHLEN.
int octave_recursive_rmdir | ( | const std::string & | name | ) |
Definition at line 539 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 546 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 492 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 499 of file file-ops.cc.
int octave_rmdir | ( | const std::string & | name | ) |
Definition at line 515 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 522 of file file-ops.cc.
int octave_symlink | ( | const std::string & | old_name, |
const std::string & | new_name | ||
) |
Definition at line 438 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 445 of file file-ops.cc.
std::string octave_tempnam | ( | const std::string & | dir, |
const std::string & | pfx | ||
) |
Definition at line 646 of file file-ops.cc.
References octave_tempnam().
Referenced by Ftmpnam(), 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 653 of file file-ops.cc.
References tempnam().
Definition at line 614 of file file-ops.cc.
Referenced by Fumask().
int octave_unlink | ( | const std::string & | name | ) |
Definition at line 624 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 631 of file file-ops.cc.
|
static |
Definition at line 218 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 136 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 171 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 99 of file file-ops.cc.
|
static |
Definition at line 104 of file file-ops.cc.