#include <cctype>#include <cerrno>#include <cstdlib>#include <map>#include <fstream>#include <iostream>#include <string>#include "dir-ops.h"#include "file-ops.h"#include "file-stat.h"#include "kpse.h"#include "oct-env.h"#include "oct-password.h"#include "oct-time.h"#include "pathsearch.h"#include "unistd-wrappers.h"
Go to the source code of this file.
Macros | |
| #define | brace_whitespace(c) (! (c) || (c) == ' ' || (c) == '\t' || (c) == '\n') |
| #define | DIR_SEP_STRING octave::sys::file_ops::dir_sep_str () |
| #define | ENV_SEP octave::directory_path::path_sep_char () |
| #define | ENV_SEP_STRING octave::directory_path::path_sep_str () |
| #define | IS_DEVICE_SEP(ch) octave::sys::file_ops::is_dev_sep (ch) |
| #define | IS_DIR_SEP(ch) octave::sys::file_ops::is_dir_sep (ch) |
| #define | IS_ENV_SEP(ch) octave::directory_path::is_path_sep (ch) |
| #define | KPSE_DEBUG |
| #define | KPSE_DEBUG_EXPAND 1 |
| #define | KPSE_DEBUG_P(bit) (kpse_debug & (1 << (bit))) |
| #define | KPSE_DEBUG_SEARCH 2 |
| #define | KPSE_DEBUG_STAT 0 |
| #define | KPSE_DEBUG_VARS 3 |
| #define | KPSE_LAST_DEBUG KPSE_DEBUG_VARS |
| #define | NAME_BEGINS_WITH_DEVICE(name) (name.length () > 0 && IS_DEVICE_SEP ((name)[1])) |
Functions | |
| static std::list< std::string > | absolute_search (const std::string &name) |
| static std::list< std::string > | array_concat (const std::list< std::string > &arr1, const std::list< std::string > &arr2) |
| static std::list< std::string > | brace_expand (const std::string &text) |
| static int | brace_gobbler (const std::string &, int &, int) |
| static bool | dir_p (const std::string &fn) |
| static std::list< std::string > | dir_search (const std::string &dir, const std::string &name, bool search_all) |
| static std::list< std::string > | expand_amble (const std::string &) |
| static std::list< std::string > | find_first_of (const std::string &path, const std::list< std::string > &names, bool all) |
| static bool | kpse_absolute_p (const std::string &filename, int relative_ok) |
| std::list< std::string > | kpse_all_path_find_first_of (const std::string &path, const std::list< std::string > &names) |
| std::list< std::string > | kpse_all_path_search (const std::string &path, const std::string &name) |
| std::string | kpse_element_dir (const std::string &elt) |
| std::string | kpse_path_expand (const std::string &path) |
| std::string | kpse_path_find_first_of (const std::string &path, const std::list< std::string > &names) |
| std::string | kpse_path_search (const std::string &path, const std::string &name) |
| static std::string | kpse_readable_file (const std::string &name) |
| static std::string | kpse_tilde_expand (const std::string &name) |
| static std::string | kpse_truncate_filename (const std::string &name) |
| static void | log_search (const std::list< std::string > &filenames) |
| std::list< std::string > | path_find_first_of (const std::string &path, const std::list< std::string > &names, bool all) |
| static std::list< std::string > | path_search (const std::string &path, const std::string &name, bool all) |
| static bool | READABLE (const std::string &fn) |
| static std::list< std::string > | search (const std::string &path, const std::string &original_name, bool all) |
Variables | |
| static int | brace_arg_separator = ',' |
| static bool | first_search = true |
| unsigned int | kpse_debug = 0 |
| #define brace_whitespace | ( | c | ) | (! (c) || (c) == ' ' || (c) == '\t' || (c) == '\n') |
| #define DIR_SEP_STRING octave::sys::file_ops::dir_sep_str () |
| #define ENV_SEP_STRING octave::directory_path::path_sep_str () |
| #define IS_DEVICE_SEP | ( | ch | ) | octave::sys::file_ops::is_dev_sep (ch) |
| #define IS_DIR_SEP | ( | ch | ) | octave::sys::file_ops::is_dir_sep (ch) |
| #define IS_ENV_SEP | ( | ch | ) | octave::directory_path::is_path_sep (ch) |
| #define KPSE_DEBUG_P | ( | bit | ) | (kpse_debug & (1 << (bit))) |
| #define KPSE_LAST_DEBUG KPSE_DEBUG_VARS |
| #define NAME_BEGINS_WITH_DEVICE | ( | name | ) | (name.length () > 0 && IS_DEVICE_SEP ((name)[1])) |
|
static |
Definition at line 311 of file kpse.cc.
References kpse_readable_file().
Referenced by find_first_of(), and search().
|
static |
Definition at line 844 of file kpse.cc.
Referenced by brace_expand().
|
static |
Definition at line 868 of file kpse.cc.
References array_concat(), brace_gobbler(), and expand_amble().
Referenced by expand_amble().
|
static |
Definition at line 949 of file kpse.cc.
References brace_whitespace.
Referenced by brace_expand(), and expand_amble().
|
static |
Definition at line 1022 of file kpse.cc.
Referenced by kpse_element_dir().
|
static |
Definition at line 287 of file kpse.cc.
References kpse_readable_file().
Referenced by path_find_first_of(), and path_search().
|
static |
Definition at line 914 of file kpse.cc.
References brace_arg_separator, brace_expand(), brace_gobbler(), and ENV_SEP.
Referenced by brace_expand().
|
static |
Definition at line 651 of file kpse.cc.
References absolute_search(), first_search, kpse_absolute_p(), KPSE_DEBUG_P, KPSE_DEBUG_SEARCH, log_search(), and path_find_first_of().
Referenced by kpse_all_path_find_first_of(), and kpse_path_find_first_of().
|
static |
Definition at line 246 of file kpse.cc.
References absolute_pathname().
Referenced by find_first_of(), and search().
| std::list<std::string> kpse_all_path_find_first_of | ( | const std::string & | path, |
| const std::list< std::string > & | names | ||
| ) |
Definition at line 747 of file kpse.cc.
References find_first_of().
Referenced by directory_path::find_all_first_of().
| std::list< std::string > kpse_all_path_search | ( | const std::string & | path, |
| const std::string & | name | ||
| ) |
Definition at line 567 of file kpse.cc.
References search().
Referenced by directory_path::find_all().
| std::string kpse_element_dir | ( | const std::string & | elt | ) |
Definition at line 1037 of file kpse.cc.
References dir_p(), DIR_SEP_STRING, IS_DEVICE_SEP, and IS_DIR_SEP.
Referenced by directory_path::all_directories(), kpse_path_expand(), path_find_first_of(), and path_search().
| std::string kpse_path_expand | ( | const std::string & | path | ) |
Definition at line 758 of file kpse.cc.
References ENV_SEP, ENV_SEP_STRING, IS_DIR_SEP, kpse_element_dir(), kpse_tilde_expand(), len, NAME_BEGINS_WITH_DEVICE, and pi.
Referenced by directory_path::init().
| std::string kpse_path_find_first_of | ( | const std::string & | path, |
| const std::list< std::string > & | names | ||
| ) |
Definition at line 731 of file kpse.cc.
References find_first_of().
Referenced by directory_path::find_first_of().
| std::string kpse_path_search | ( | const std::string & | path, |
| const std::string & | name | ||
| ) |
Definition at line 556 of file kpse.cc.
References search().
Referenced by directory_path::find_first().
|
static |
Definition at line 205 of file kpse.cc.
References kpse_truncate_filename(), and READABLE().
Referenced by absolute_search(), and dir_search().
|
static |
Definition at line 396 of file kpse.cc.
References IS_DIR_SEP.
Referenced by kpse_path_expand(), and search().
|
static |
Definition at line 132 of file kpse.cc.
References IS_DEVICE_SEP, and IS_DIR_SEP.
Referenced by kpse_readable_file().
|
static |
Definition at line 264 of file kpse.cc.
References KPSE_DEBUG_P, and KPSE_DEBUG_SEARCH.
Referenced by find_first_of(), and search().
| std::list<std::string> path_find_first_of | ( | const std::string & | path, |
| const std::list< std::string > & | names, | ||
| bool | all | ||
| ) |
Definition at line 577 of file kpse.cc.
References dir_search(), first_search, IS_DIR_SEP, kpse_element_dir(), NAME_BEGINS_WITH_DEVICE, and pi.
Referenced by find_first_of().
|
static |
Definition at line 327 of file kpse.cc.
References dir_search(), first_search, IS_DIR_SEP, kpse_element_dir(), NAME_BEGINS_WITH_DEVICE, and pi.
Referenced by search().
|
inlinestatic |
Definition at line 170 of file kpse.cc.
References octave_access_r_ok(), octave_access_wrapper(), and u8_to_wstring().
Referenced by kpse_readable_file().
|
static |
Definition at line 495 of file kpse.cc.
References absolute_search(), first_search, kpse_absolute_p(), KPSE_DEBUG_P, KPSE_DEBUG_SEARCH, kpse_tilde_expand(), log_search(), and path_search().
Referenced by documentation::documentation(), Faudioformats(), kpse_all_path_search(), and kpse_path_search().
|
static |
Definition at line 907 of file kpse.cc.
Referenced by expand_amble().
|
static |
Definition at line 259 of file kpse.cc.
Referenced by find_first_of(), path_find_first_of(), path_search(), and search().
| unsigned int kpse_debug = 0 |
Definition at line 92 of file kpse.cc.
Referenced by directory_path::init().