#include "file-ops.h"
Public Types | |
typedef std::string(* | tilde_expansion_hook )(const std::string &) |
Public Member Functions | |
file_ops (char dir_sep_char_arg=0, const std::string &dir_sep_str_arg=std::string("/"), const std::string &dir_sep_chars_arg=std::string("/")) | |
Static Public Member Functions | |
static std::string | concat (const std::string &, const std::string &) |
static char | dir_sep_char (void) |
static std::string | dir_sep_chars (void) |
static std::string | dir_sep_str (void) |
static bool | is_dir_sep (char c) |
static std::string | tail (const std::string &path) |
static string_vector | tilde_expand (const string_vector &) |
static std::string | tilde_expand (const std::string &) |
Static Public Attributes | |
static string_vector | tilde_additional_prefixes = default_prefixes |
static string_vector | tilde_additional_suffixes = default_suffixes |
static tilde_expansion_hook | tilde_expansion_failure_hook = 0 |
static tilde_expansion_hook | tilde_expansion_preexpansion_hook = 0 |
Private Member Functions | |
file_ops (const file_ops &) | |
file_ops & | operator= (const file_ops &) |
Static Private Member Functions | |
static void | cleanup_instance (void) |
static bool | instance_ok (void) |
Private Attributes | |
char | xdir_sep_char |
std::string | xdir_sep_chars |
std::string | xdir_sep_str |
Static Private Attributes | |
static file_ops * | instance = 0 |
Definition at line 32 of file file-ops.h.
typedef std::string(* file_ops::tilde_expansion_hook)(const std::string &) |
Definition at line 48 of file file-ops.h.
file_ops::file_ops | ( | char | dir_sep_char_arg = 0 , |
|
const std::string & | dir_sep_str_arg = std::string ("/") , |
|||
const std::string & | dir_sep_chars_arg = std::string ("/") | |||
) | [inline] |
Definition at line 42 of file file-ops.h.
Referenced by instance_ok().
file_ops::file_ops | ( | const file_ops & | ) | [private] |
static void file_ops::cleanup_instance | ( | void | ) | [inline, static, private] |
Definition at line 102 of file file-ops.h.
Referenced by instance_ok().
std::string file_ops::concat | ( | const std::string & | dir, | |
const std::string & | file | |||
) | [static] |
Definition at line 355 of file file-ops.cc.
References dir_sep_char(), and is_dir_sep().
Referenced by contents_file_in_path(), default_history_file(), DEFUNX(), load_path::do_find_all_first_of(), load_path::do_find_first_of(), load_path::do_find_private_fcn(), execute_pkg_add_or_del(), and genpath().
static char file_ops::dir_sep_char | ( | void | ) | [inline, static] |
Definition at line 58 of file file-ops.h.
Referenced by concat(), and subst_octave_home().
static std::string file_ops::dir_sep_chars | ( | void | ) | [inline, static] |
Definition at line 68 of file file-ops.h.
Referenced by DEFUN(), octave_env::do_base_pathname(), load_path::do_find_all_first_of(), load_path::do_find_dir(), load_path::do_find_file(), load_path::do_find_first_of(), load_path::do_find_matching_dirs(), octave_env::do_make_absolute(), octave_env::do_set_program_name(), execute_command_line_file(), symbol_table::fcn_info::fcn_info_rep::find_autoload(), find_file_to_load(), symbol_table::fcn_info::fcn_info_rep::load_private_function(), looks_like_struct(), read_mat5_binary_element(), and octave_fcn_handle::set_fcn().
static std::string file_ops::dir_sep_str | ( | void | ) | [inline, static] |
Definition at line 63 of file file-ops.h.
Referenced by DEFUN(), DEFUN_DLD(), load_path::do_find_dir(), load_path::do_find_matching_dirs(), octave_env::do_get_home_directory(), octave_env::do_make_absolute(), symbol_table::find_function(), initialize_pathsearch(), and octave_recursive_rmdir().
bool file_ops::instance_ok | ( | void | ) | [static, private] |
Definition at line 55 of file file-ops.cc.
References singleton_cleanup_list::add(), cleanup_instance(), file_ops(), and instance.
Definition at line 73 of file file-ops.h.
Referenced by concat(), octave_env::do_absolute_pathname(), octave_env::do_chdir(), load_path::do_find_dir(), load_path::do_find_matching_dirs(), octave_env::do_make_absolute(), octave_env::do_polite_directory_format(), octave_env::do_rooted_relative_pathname(), file_is_in_dir(), isolate_tilde_prefix(), octave_env::pathname_backup(), strip_trailing_separators(), tilde_expand_word(), tilde_find_suffix(), and file_stat::update_internal().
static std::string file_ops::tail | ( | const std::string & | path | ) | [inline, static] |
Definition at line 86 of file file-ops.h.
string_vector file_ops::tilde_expand | ( | const string_vector & | names | ) | [static] |
Definition at line 340 of file file-ops.cc.
References Array< T >::length(), string_vector::resize(), and tilde_expand().
std::string file_ops::tilde_expand | ( | const std::string & | name | ) | [static] |
Definition at line 281 of file file-ops.cc.
References tilde_expand_word(), tilde_find_prefix(), and tilde_find_suffix().
Referenced by DEFUN(), DEFUN_DLD(), DEFUNX(), load_path::do_add(), load_path::do_remove(), do_stream_open(), load_path::find_dir_info(), octave_change_to_directory(), octave_chdir(), dir_entry::open(), command_editor::read_init_file(), command_history::set_file(), tilde_expand(), and file_stat::update_internal().
file_ops * file_ops::instance = 0 [static, private] |
Definition at line 100 of file file-ops.h.
Referenced by instance_ok().
Definition at line 54 of file file-ops.h.
Definition at line 56 of file file-ops.h.
Definition at line 52 of file file-ops.h.
Referenced by tilde_expand_word().
Definition at line 50 of file file-ops.h.
Referenced by tilde_expand_word().
char file_ops::xdir_sep_char [private] |
Definition at line 112 of file file-ops.h.
std::string file_ops::xdir_sep_chars [private] |
Definition at line 114 of file file-ops.h.
std::string file_ops::xdir_sep_str [private] |
Definition at line 113 of file file-ops.h.