94 catch (octave_execution_exception)
107 std::string msg = fs.
error ();
115 size_t pos = name.find (
'.');
117 if (pos == std::string::npos)
118 return package_dir_map.find (name) != package_dir_map.end ();
121 std::string name_head = name.substr (0, pos);
122 std::string name_tail = name.substr (pos + 1);
126 if (it != package_dir_map.end ())
127 return it->second.is_package (name_tail);
138 dir_time_last_checked =
octave_time (static_cast<time_t> (0));
144 method_file_map.clear ();
145 package_dir_map.clear ();
147 dir_mtime = fs.
mtime ();
162 catch (octave_execution_exception)
169 std::string msg = fs.
error ();
170 warning (
"load_path: %s: %s", dir_name.c_str (), msg.c_str ());
185 all_files.resize (len);
186 fcn_files.resize (len);
193 std::string fname = flist[i];
203 if (fname ==
"private")
204 get_private_file_map (full_name);
205 else if (fname[0] ==
'@')
206 get_method_file_map (full_name, fname.substr (1));
207 else if (fname[0] ==
'+')
208 get_package_dir (full_name, fname.substr (1));
212 all_files[all_files_count++] = fname;
214 size_t pos = fname.rfind (
'.');
216 if (pos != std::string::npos)
218 std::string ext = fname.substr (pos);
220 if (ext ==
".m" || ext ==
".oct" || ext ==
".mex")
222 std::string base = fname.substr (0, pos);
225 fcn_files[fcn_files_count++] = fname;
232 all_files.resize (all_files_count);
233 fcn_files.resize (fcn_files_count);
237 std::string msg = dir.
error ();
238 warning (
"load_path: %s: %s", d.c_str (), msg.c_str ());
257 std::string fname = flist[i];
260 std::string base = fname;
262 size_t pos = fname.rfind (
'.');
264 if (pos != std::string::npos)
266 base = fname.substr (0, pos);
267 ext = fname.substr (pos);
275 else if (ext ==
".oct")
277 else if (ext ==
".mex")
287 std::string msg = dir.
error ();
288 warning (
"load_path: %s: %s", d.c_str (), msg.c_str ());
302 const std::string& class_name)
304 method_file_map[class_name].method_file_map =
get_fcn_files (d);
311 method_file_map[class_name].private_file_map =
get_fcn_files (pd);
316 const std::string& package_name)
318 package_dir_map[package_name] =
dir_info (d);
336 ::error (
"unable to create load path object!");
355 if (retval->dir_name == dir)
373 if (retval->dir_name == dir)
415 std::string fname = fcn_files[k];
418 std::string base = fname;
420 size_t pos = fname.rfind (
'.');
422 if (pos != std::string::npos)
424 base = fname.substr (0, pos);
425 ext = fname.substr (pos);
430 if (file_info_list.size () == 1)
435 p != file_info_list.end ();
438 if (p->dir_name == dir_name)
442 file_info_list.erase (p);
445 file_info_list.push_back (fi);
447 file_info_list.push_front (fi);
460 i != method_map.end ();
463 std::string class_name = i->first;
467 std::string full_dir_name
474 if (file_info_list.size () == 1)
479 p != file_info_list.end (); p++)
481 if (p->dir_name == full_dir_name)
485 file_info_list.erase (p);
488 file_info_list.push_back (fi);
490 file_info_list.push_front (fi);
528 p != package_dir_map.end (); ++p)
530 std::string full_name = p->first;
532 if (! pname.empty ())
533 full_name = pname +
"." + full_name;
535 move (p->second, at_end, full_name);
544 std::list<std::string>::iterator s =
557 move_fcn_map (dir_name, di.
fcn_files, at_end);
561 move_method_map (dir_name, at_end);
567 std::string tpath =
genpath (dir);
569 if (! tpath.empty ())
583 if (set_initial_path)
603 if (! tpath.empty ())
613 do_set (xpath,
false,
true);
626 static std::list<std::string>
629 std::list<std::string> retval;
634 size_t len = p.length ();
636 while (end != std::string::npos)
638 std::string elt = p.substr (beg, end-beg);
641 retval.push_back (elt);
651 std::string elt = p.substr (beg);
654 retval.push_back (elt);
666 std::set<std::string> elts_set (elts.begin (), elts.end ());
672 for (std::set<std::string>::const_iterator it =
init_dirs.begin ();
675 if (elts_set.find (*it) == elts_set.end ())
678 "default load path altered. Some built-in functions may not be found. Try restoredefaultpath() to recover it.");
693 for (std::list<std::string>::const_iterator i = elts.begin ();
694 i != elts.end (); i++)
723 do_add (dir,
false, warn);
731 std::string dir = dir_arg;
733 size_t k = dir.length ();
738 if (k < dir.length ())
747 size_t len = dir_arg.length ();
749 if (len > 1 && dir_arg.substr (len-2) ==
"//")
751 "trailing '//' is no longer special in search path elements");
785 warning (
"addpath: %s: not a directory", dir_arg.c_str ());
789 std::string msg = fs.
error ();
790 warning (
"addpath: %s: %s", dir_arg.c_str (), msg.c_str ());
810 std::string fname = fcn_files[k];
813 std::string base = fname;
815 size_t pos = fname.rfind (
'.');
817 if (pos != std::string::npos)
819 base = fname.substr (0, pos);
820 ext = fname.substr (pos);
826 p != file_info_list.end ();
829 if (p->dir_name == dir)
831 file_info_list.erase (p);
833 if (file_info_list.empty ())
834 fcn_map.erase (fname);
847 if (p != private_fcn_map.end ())
848 private_fcn_map.erase (p);
855 i != method_map.end ();
858 std::string class_name = i->first;
868 if (file_info_list.size () == 1)
873 p != file_info_list.end (); p++)
875 if (p->dir_name == full_dir_name)
877 file_info_list.erase (p);
896 if (! dir_arg.empty ())
900 warning (
"rmpath: can't remove \".\" from path");
942 p != package_dir_map.end (); ++p)
944 std::string full_name = p->first;
946 if (! pname.empty ())
947 full_name = pname +
"." + full_name;
949 remove (p->second, full_name);
962 remove_fcn_map (dir, fcn_files);
964 remove_private_fcn_map (dir);
966 remove_method_map (dir);
994 const std::string& fcn,
const char *who)
1081 error (
"%s: %s: invalid type code = %d", who, fcn.c_str (),
type);
1094 if (fcn.length () > 0 && fcn[0] ==
'@')
1096 size_t pos = fcn.find (
'/');
1098 if (pos != std::string::npos)
1100 std::string class_name = fcn.substr (1, pos-1);
1101 std::string meth = fcn.substr (pos+1);
1103 retval =
find_method (class_name, meth, dir_name);
1106 retval = std::string ();
1110 dir_name = std::string ();
1114 if (p != fcn_map.end ())
1119 i != file_info_list.end ();
1127 fcn,
"load_path::do_find_fcn"))
1133 retval = std::string ();
1143 const std::string& fcn,
int type)
const
1151 if (q != private_fcn_map.end ())
1163 "load_path::find_private_fcn"))
1173 const std::string& meth,
1174 std::string& dir_name,
int type)
const
1180 dir_name = std::string ();
1184 if (q != method_map.end ())
1195 i != file_info_list.end ();
1203 meth,
"load_path::do_find_method");
1211 retval = std::string ();
1219 std::list<std::string>
1222 std::list<std::string> retval;
1228 if (q != method_map.end ())
1233 retval.push_back (p->first);
1236 if (! retval.empty ())
1249 if (p->is_package (name))
1256 std::list<std::string>
1259 std::list<std::string> retval;
1267 l->second.overloads (meth, retval);
1274 std::list<std::string>& l)
const
1277 q != method_map.end (); q++)
1281 if (m.find (meth) != m.end ())
1283 std::string class_name = q->first;
1285 if (! prefix.empty ())
1286 class_name = prefix +
"." + class_name;
1288 l.push_back (class_name);
1312 std::string dir_name = curr_fcn->
dir_name ();
1314 if (! dir_name.empty ())
1339 return fs.
exists () ? file : retval;
1345 if (! tfile.empty ())
1380 if (all_files[i] == file)
1411 size_t dname_len = dname.length ();
1415 dname = dname.substr (0, dname_len - 1);
1419 size_t dir_len = dir.length ();
1421 if (dname_len > dir_len
1423 && dir.compare (dname.substr (dname_len - dir_len)) == 0)
1439 std::list<std::string> retlist;
1448 retlist.push_back (dir);
1458 size_t dname_len = dname.length ();
1462 dname = dname.substr (0, dname_len - 1);
1466 size_t dir_len = dir.length ();
1468 if (dname_len > dir_len
1470 && dir.compare (dname.substr (dname_len - dir_len)) == 0)
1475 retlist.push_back (p->dir_name);
1488 std::string dir_name;
1489 std::string file_name;
1498 std::string file = flist[i];
1526 rel_flist[rel_flen++] = file;
1529 rel_flist.
resize (rel_flen);
1543 if (all_files[i] == rel_flist[j])
1545 dir_name = p->dir_name;
1546 file_name = rel_flist[j];
1556 if (! dir_name.empty ())
1565 std::list<std::string> retlist;
1567 std::string dir_name;
1568 std::string file_name;
1577 std::string file = flist[i];
1587 retlist.push_back (file);
1600 retlist.push_back (tfile);
1605 rel_flist[rel_flen++] = file;
1608 rel_flist.
resize (rel_flen);
1621 if (all_files[i] == rel_flist[j])
1643 retval[k++] = i->dir_name;
1648 std::list<std::string>
1651 std::list<std::string> retval;
1656 retval.push_back (i->dir_name);
1669 retval = p->fcn_files;
1677 std::string fname = retval[i];
1679 size_t pos = fname.rfind (
'.');
1681 if (pos != std::string::npos)
1682 retval[i] = fname.substr (0, pos);
1698 size_t len = fcn_map.size ();
1705 p != fcn_map.end ();
1707 retval[count++] = p->first;
1733 bool printed_type =
false;
1738 printed_type =
true;
1746 printed_type =
true;
1754 printed_type =
true;
1766 os <<
" " << p->first <<
" (";
1787 std::string nm = p->first;
1789 int types = p->second;
1798 retval[count++] = nm;
1813 if (! fcn_files.
empty ())
1815 os <<
"\n*** function files in " << i->dir_name <<
":\n\n";
1821 = i->method_file_map;
1823 if (! method_file_map.empty ())
1826 p = method_file_map.begin (); p != method_file_map.end (); p++)
1828 os <<
"\n*** methods in " << i->dir_name
1829 <<
"/@" << p->first <<
":\n\n";
1844 l->second.display (os);
1851 size_t ps = path.size ();
1852 size_t pls = path_list.size ();
1853 size_t pos = path_list.find (path);
1855 while (pos != std::string::npos)
1857 if ((pos == 0 || path_list[pos-1] == psc)
1858 && (pos + ps == pls || path_list[pos + ps] == psc))
1861 pos = path_list.find (path, pos + 1);
1869 const std::string& pname)
const
1878 p != package_dir_map.end (); ++p)
1880 std::string full_name = p->first;
1882 if (! pname.empty ())
1883 full_name = pname +
"." + full_name;
1885 add (p->second, at_end, full_name);
1892 std::string dir_name = di.
dir_name;
1900 std::string fname = fcn_files[i];
1903 std::string base = fname;
1905 size_t pos = fname.rfind (
'.');
1907 if (pos != std::string::npos)
1909 base = fname.substr (0, pos);
1910 ext = fname.substr (pos);
1917 while (p != file_info_list.end ())
1919 if (p->dir_name == dir_name)
1928 else if (ext ==
".oct")
1930 else if (ext ==
".mex")
1933 if (p == file_info_list.end ())
1938 file_info_list.push_back (fi);
1943 if (! file_info_list.empty ())
1945 file_info& old = file_info_list.front ();
1954 if (fname !=
"Contents.m"
1961 "function %s shadows a core library function",
1969 "function %s shadows a built-in function",
1973 file_info_list.push_front (fi);
1990 if (! private_file_map.empty ())
1991 private_fcn_map[di.
dir_name] = private_file_map;
1997 std::string dir_name = di.
dir_name;
2003 q != method_file_map.end ();
2006 std::string class_name = q->first;
2010 std::string full_dir_name
2022 std::string base = p->first;
2024 int types = p->second;
2030 while (p2 != file_info_list.end ())
2032 if (p2->dir_name == full_dir_name)
2038 if (p2 == file_info_list.end ())
2043 file_info_list.push_back (fi);
2045 file_info_list.push_front (fi);
2060 if (! private_file_map.empty ())
2061 private_fcn_map[full_dir_name] = private_file_map;
2068 os <<
"*** loader: " << (prefix.empty () ?
"<top-level>" : prefix) <<
"\n\n";
2070 for (std::list<std::string>::const_iterator s =
dir_list.begin ();
2076 i != private_fcn_map.end (); i++)
2078 os <<
"\n*** private functions in "
2084 #if defined (DEBUG_LOAD_PATH)
2087 i != fcn_map.end ();
2090 os << i->first <<
":\n";
2095 p != file_info_list.end ();
2098 os <<
" " << p->dir_name <<
" (";
2107 i != method_map.end ();
2110 os <<
"CLASS " << i->first <<
":\n";
2118 os <<
" " << q->first <<
":\n";
2123 p != file_info_list.end ();
2126 os <<
" " << p->dir_name <<
" (";
2157 std::string elt = dirlist[i];
2159 bool skip_p = (elt ==
"." || elt ==
".." || elt[0] ==
'@'
2166 skip_p = (elt == skip[j]);
2187 std::list<std::string>
2190 std::list<std::string> retval;
2195 if (! only_top_level || l->first.find (
'.') == std::string::npos)
2196 retval.push_back (l->first);
2204 const std::string& script_file)
2233 @deftypefn {Built-in Function} {} genpath (@var{dir})\n\
2234 @deftypefnx {Built-in Function} {} genpath (@var{dir}, @var{skip}, @dots{})\n\
2235 Return a path constructed from @var{dir} and all its subdirectories.\n\
2237 If additional string parameters are given, the resulting path will exclude\n\
2238 directories with those names.\n\
2247 std::string dirname = args(0).string_value ();
2252 error (
"genpath: DIR must be a string");
2254 else if (nargin > 1)
2256 std::string dirname = args(0).string_value ();
2262 skip[i-1] = args(i).string_value ();
2269 retval =
genpath (dirname, skip);
2271 error (
"genpath: all arguments must be strings");
2293 @deftypefn {Built-in Function} {} rehash ()\n\
2294 Reinitialize Octave's load path directory cache.\n\
2306 @deftypefn {Built-in Function} {} command_line_path (@dots{})\n\
2307 Return the command line path variable.\n\
2309 @seealso{path, addpath, rmpath, genpath, pathdef, savepath, pathsep}\n\
2315 DEFUN (restoredefaultpath, , ,
2317 @deftypefn {Built-in Function} {} restoredefaultpath (@dots{})\n\
2318 Restore Octave's path to its initial state at startup.\n\
2320 @seealso{path, addpath, rmpath, genpath, pathdef, savepath, pathsep}\n\
2333 DEFUN (__pathorig__, , ,
2335 @deftypefn {Built-in Function} {@var{val} =} __pathorig__ ()\n\
2336 Undocumented internal function.\n\
2344 @deftypefn {Built-in Function} {} path (@dots{})\n\
2345 Modify or display Octave's load path.\n\
2347 If @var{nargin} and @var{nargout} are zero, display the elements of\n\
2348 Octave's load path in an easy to read format.\n\
2350 If @var{nargin} is zero and nargout is greater than zero, return the\n\
2351 current load path.\n\
2353 If @var{nargin} is greater than zero, concatenate the arguments,\n\
2354 separating them with @code{pathsep}. Set the internal search path\n\
2355 to the result and return it.\n\
2357 No checks are made for duplicate elements.\n\
2358 @seealso{addpath, rmpath, genpath, pathdef, savepath, pathsep}\n\
2363 int argc = args.
length () + 1;
2371 std::string
path = argv[1];
2373 for (
int i = 2; i < argc; i++)
2383 else if (argc == 1 && nargout == 0)
2386 "\nOctave's search path contains the following directories:\n\n";
2399 DEFUN (addpath, args, nargout,
2401 @deftypefn {Built-in Function} {} addpath (@var{dir1}, @dots{})\n\
2402 @deftypefnx {Built-in Function} {} addpath (@var{dir1}, @dots{}, @var{option})\n\
2403 Add named directories to the function search path.\n\
2405 If @var{option} is @qcode{\"-begin\"} or 0 (the default), prepend the\n\
2406 directory name to the current path. If @var{option} is @qcode{\"-end\"}\n\
2407 or 1, append the directory name to the current path.\n\
2408 Directories added to the path must exist.\n\
2410 In addition to accepting individual directory arguments, lists of\n\
2411 directory names separated by @code{pathsep} are also accepted. For example:\n\
2414 addpath (\"dir1:/dir2:~/dir3\")\n\
2416 @seealso{path, rmpath, genpath, pathdef, savepath, pathsep}\n\
2427 int nargin = args.length ();
2439 if (option ==
"-end")
2444 else if (option ==
"-begin")
2462 error (
"addpath: expecting final argument to be 1 or 0");
2468 error (
"addpath: expecting final argument to be 1 or 0");
2473 bool need_to_update =
false;
2475 for (
int i = 0; i < nargin; i++)
2477 if (args(i).is_string ())
2479 std::string
arg = args(i).string_value ();
2481 std::list<std::string> dir_elts =
split_path (arg);
2484 std::reverse (dir_elts.begin (), dir_elts.end ());
2486 for (std::list<std::string>::const_iterator p = dir_elts.begin ();
2487 p != dir_elts.end ();
2490 std::string dir = *p;
2500 need_to_update =
true;
2504 error (
"addpath: all arguments must be strings");
2516 DEFUN (rmpath, args, nargout,
2518 @deftypefn {Built-in Function} {} rmpath (@var{dir1}, @dots{})\n\
2519 Remove @var{dir1}, @dots{} from the current function search path.\n\
2521 In addition to accepting individual directory arguments, lists of\n\
2522 directory names separated by @code{pathsep} are also accepted. For example:\n\
2525 rmpath (\"dir1:/dir2:~/dir3\")\n\
2527 @seealso{path, addpath, genpath, pathdef, savepath, pathsep}\n\
2538 int nargin = args.length ();
2542 bool need_to_update =
false;
2544 for (
int i = 0; i < nargin; i++)
2546 if (args(i).is_string ())
2548 std::string
arg = args(i).string_value ();
2549 std::list<std::string> dir_elts =
split_path (arg);
2551 for (std::list<std::string>::const_iterator p = dir_elts.begin ();
2552 p != dir_elts.end ();
2555 std::string dir = *p;
2561 warning (
"rmpath: %s: not found", dir.c_str ());
2563 need_to_update =
true;
2567 error (
"addpath: all arguments must be strings");
fcn_map_type::iterator fcn_map_iterator
static void maybe_add_path_elts(std::string &path, const std::string &dir)
void warning_with_id(const char *id, const char *fmt,...)
void remove_private_fcn_map(const std::string &dir)
static std::string system_path(void)
static bool in_path_list(const std::string &path_list, const std::string &path)
void do_update(void) const
friend void print_types(std::ostream &os, int types)
void add_to_fcn_map(const dir_info &di, bool at_end)
std::string error(void) const
std::set< std::string > init_dirs
method_file_map_type method_file_map
std::string find_private_file(const std::string &fname)
bool same_file(const std::string &f, const std::string &g)
std::string Vlocal_oct_file_dir
fcn_file_map_type private_file_map
method_map_type::iterator method_map_iterator
static void display(std::ostream &os)
void get_package_dir(const std::string &d, const std::string &package_name)
void get_file_list(const std::string &d)
std::string do_find_dir(const std::string &dir) const
void source_file(const std::string &file_name, const std::string &context, bool verbose, bool require_file, const std::string &warn_for)
static std::string path_sep_str(void)
std::string Vlocal_fcn_file_dir
static void prepend(const std::string &dir, bool warn=false)
string_vector do_find_matching_dirs(const std::string &dir) const
std::map< std::string, int > fcn_file_map_type
static std::string command_line_path
OCTINTERP_API void print_usage(void)
std::string Vlocal_ver_fcn_file_dir
dir_info_list_type::iterator dir_info_list_iterator
static void append(const std::string &dir, bool warn=false)
std::map< std::string, dir_info > package_dir_map_type
void get_private_file_map(const std::string &d)
bool is_numeric_type(void) const
loader & get_loader(const std::string &name) const
std::ostream & list_in_columns(std::ostream &, int width=0, const std::string &prefix=std::string()) const
int int_value(bool req_int=false, bool frc_str_conv=false) const
string_vector do_find_all_first_of(const string_vector &files) const
file_info_list_type::const_iterator const_file_info_list_iterator
fcn_file_map_type private_file_map
dir_info_list_type dir_info_list
void remove(const dir_info &di)
#define DEFUN(name, args_name, nargout_name, doc)
void error(const char *fmt,...)
private_fcn_map_type::const_iterator const_private_fcn_map_iterator
void move_method_map(const std::string &dir, bool at_end)
std::string Vfcn_file_dir
static abs_dir_cache_type abs_dir_cache
private_fcn_map_type::iterator private_fcn_map_iterator
void(* hook_fcn_ptr)(const std::string &dir)
std::string find_fcn(const std::string &fcn, std::string &dir_name, int type=M_FILE|OCT_FILE|MEX_FILE) const
std::string do_find_first_of(const string_vector &files) const
void add(const dir_info &di, bool at_end, const std::string &pname=std::string()) const
void overloads(const std::string &meth, std::list< std::string > &l) const
string_vector do_fcn_names(void) const
void do_initialize(bool set_initial_path)
static const int MEX_FILE
method_map_type::const_iterator const_method_map_iterator
static void execute_pkg_add_or_del(const std::string &dir, const std::string &script_file)
void move(const dir_info &di, bool at_end, const std::string &pname=std::string())
F77_RET_T const double const double double * d
static void rehash_internal(void)
std::string Voct_data_dir
octave_time dir_time_last_checked
void remove_fcn_map(const std::string &dir, const string_vector &fcn_files)
static std::string tilde_expand(const std::string &)
void do_append(const std::string &dir, bool warn)
static hook_fcn_ptr remove_hook
std::list< file_info > file_info_list_type
static std::string concat(const std::string &, const std::string &)
static void cleanup_instance(void)
std::list< std::string > methods(const std::string &class_name) const
std::map< std::string, file_info_list_type > fcn_map_type
std::string do_find_file(const std::string &file) const
static hook_fcn_ptr add_hook
static char path_sep_char(void)
bool valid_identifier(const char *s)
std::string Vlocal_api_fcn_file_dir
std::string string_value(bool force=false) const
fcn_file_map_type::const_iterator const_fcn_file_map_iterator
string_vector do_files(const std::string &dir, bool omit_exts) const
void resize(octave_idx_type n, const std::string &rfv=std::string())
std::string find_method(const std::string &class_name, const std::string &meth, std::string &dir_name, int type=M_FILE|OCT_FILE|MEX_FILE) const
static std::string make_absolute(const std::string &s, const std::string &dot_path=get_current_directory())
static bool instance_ok(void)
static std::string sys_path
bool is_string(void) const
std::map< std::string, dir_info > abs_dir_cache_type
friend dir_info::fcn_file_map_type get_fcn_files(const std::string &d)
void add(const dir_info &di, bool at_end)
void add_to_private_fcn_map(const dir_info &di)
static std::string getenv(const std::string &name)
void do_prepend(const std::string &dir, bool warn)
static void initialize(bool set_initial_path=false)
std::list< std::string > do_overloads(const std::string &meth) const
std::list< std::string > do_get_all_package_names(bool only_top_level) const
std::string find_private_fcn(const std::string &dir, const std::string &fcn, int type=M_FILE|OCT_FILE|MEX_FILE) const
std::list< std::string > do_dir_list(void) const
dir_info_list_type::const_iterator const_dir_info_list_iterator
void execute_pkg_del(const std::string &dir)
friend string_vector get_file_list(const dir_info::fcn_file_map_type &lst)
static std::string find_method(const std::string &class_name, const std::string &meth, std::string &dir_name, const std::string &pack_name=std::string())
string_vector & sort(bool make_uniq=false)
octave_idx_type length(void) const
static bool absolute_pathname(const std::string &s)
string_vector do_dirs(void) const
void move(const dir_info &di, bool at_end)
static bool rooted_relative_pathname(const std::string &s)
std::string do_path(void) const
file_info_list_type::iterator file_info_list_iterator
void get_method_file_map(const std::string &d, const std::string &class_name)
static octave_user_function * get_curr_fcn(scope_id scope=xcurrent_scope)
void move_fcn_map(const std::string &dir, const string_vector &fcn_files, bool at_end)
abs_dir_cache_type::iterator abs_dir_cache_iterator
package_dir_map_type::const_iterator const_package_dir_map_iterator
std::string Vlocal_ver_oct_file_dir
static load_path * instance
const_dir_info_list_iterator find_dir_info(const std::string &dir) const
static octave_idx_type find(octave_idx_type i, octave_idx_type *pp)
method_file_map_type::const_iterator const_method_file_map_iterator
void warning(const char *fmt,...)
std::string dir_name(void) const
std::string error(void) const
static std::string dir_sep_chars(void)
void do_set(const std::string &p, bool warn, bool is_init=false)
octave_idx_type length(void) const
Number of elements in the array.
octave_time mtime(void) const
static bool set_initial_path
void execute_pkg_add(const std::string &dir)
std::string Voct_file_dir
static std::string strip_trailing_separators(const std::string &dir_arg)
void remove_method_map(const std::string &dir)
string_vector fcn_names(void) const
fcn_map_type::const_iterator const_fcn_map_iterator
void add_to_method_map(const dir_info &di, bool at_end)
static std::list< std::string > split_path(const std::string &p)
fcn_file_map_type method_file_map
static bool is_dir_sep(char c)
static string_vector dirs(void)
void do_add(const std::string &dir, bool at_end, bool warn)
static std::list< std::string > dir_list(void)
void do_move(dir_info_list_iterator i, bool at_end)
bool contains(const std::string &dir) const
package_dir_map_type package_dir_map
bool is_package(const std::string &name) const
octave_time time_resolution(void) const
loader_map_type::const_iterator const_loader_map_iterator
bool do_remove(const std::string &dir)
static void set(const std::string &p, bool warn=false)
static bool is_built_in_function_name(const std::string &name)
static std::string get_command_line_path(void)
static std::string dir_sep_str(void)
friend void print_fcn_list(std::ostream &os, const dir_info::fcn_file_map_type &lst)
bool is_package(const std::string &name) const
void display(std::ostream &out) const
static bool check_file_type(std::string &fname, int type, int possible_types, const std::string &fcn, const char *who)
loader_map_type loader_map
static const int OCT_FILE
static std::string path(void)
std::map< std::string, class_info > method_file_map_type
static bool remove(const std::string &dir)
bool octave_interpreter_ready
std::string genpath(const std::string &dirname, const string_vector &skip)
bool do_contains_canonical(const std::string &dir) const
return octave_value(v1.char_array_value().concat(v2.char_array_value(), ra_idx),((a1.is_sq_string()||a2.is_sq_string())? '\'': '"'))
void do_display(std::ostream &os) const
std::string Vlocal_api_oct_file_dir