Mercurial > hg > octave-lyh
diff src/dirfns.cc @ 5777:246b1fc1e628
[project @ 2006-04-26 18:16:24 by jwe]
author | jwe |
---|---|
date | Wed, 26 Apr 2006 18:16:25 +0000 |
parents | ace8d8d26933 |
children | 1138ced03f14 |
line wrap: on
line diff
--- a/src/dirfns.cc +++ b/src/dirfns.cc @@ -45,6 +45,7 @@ #include "file-stat.h" #include "glob-match.h" #include "oct-env.h" +#include "pathsearch.h" #include "str-vec.h" #include "Cell.h" @@ -679,6 +680,41 @@ return retval; } +DEFUN (filesep, args, , + "-*- texinfo -*-\n\ +@detypefn {Built-in Function} {} filesep ()\n\ +Return the system-dependent character used to separate directory names.\n\ +@seealso{pathsep, dir, ls}\n\ +@end deftypefn") +{ + octave_value retval; + + if (args.length () == 0) + retval = file_ops::dir_sep_str; + else + print_usage ("filesep"); + + return retval; +} + +DEFUN (pathsep, args, , + "-*- texinfo -*-\n\ +@deftypefn {Built-in Function} {} pathsep ()\n\ +Return the system-dependent character used to separate directories in\n\ +a path.\n\ +@seealso{filesep, dir, ls}\n\ +@end deftypefn") +{ + octave_value retval; + + if (args.length () == 0) + retval = dir_path::path_sep_str; + else + print_usage ("pathsep"); + + return retval; +} + static int confirm_recursive_rmdir (void) { @@ -695,17 +731,8 @@ @defvr {Built-in Variable} confirm_recursive_rmdir\n\ If the value of @code{confirm_recursive_rmdir} is nonzero, Octave\n\ will ask for confirmation before recursively removing a directory tree.\n\ -The default value is 0.\n\ +The default value is 1.\n\ @end defvr"); - - DEFCONST (filesep, file_ops::dir_sep_str, - "-*- texinfo -*-\n\ -@defvr {Built-in Variable} filesep\n\ -The character used to separate directory names. The value\n\ -of this variable is system dependent.\n\ -@seealso{dir, ls}\n\ -@end defvr"); - } /*