Mercurial > octave
diff scripts/miscellaneous/copyfile.m @ 25781:e04c56bbbace
isdir.m: Make m-file a legacy function (bug #54489)
* isdir.m: Note that function is not recommended in docstring.
Add 1-time warning about function being obsolete. Add first time
BIST test to provoke and suppress warning.
* scripts/legacy/module.mk, scripts/miscellaneous/module.mk: Move isdir.m from
miscellaneous/ dir to legacy/ dir.
* NEWS: Announce change to legacy function.
* syscalls.cc (Fstat): Add isfolder to @seealso link.
* utils.cc (Fis_absolute_filename, Fis_rooted_relative_filename, Fmake_absolute_filename):
Replace isdir with isfolder in @seealso links.
* uigetdir.m, uigetfile.m, uiputfile.m, which.m, copyfile.m, mkdir.m,
movefile.m, tempdir.m, unpack.m, what.m, __print_parse_opts__.m,
compare_plot_demos.m, rundemos.m, runtests.m: Replace instances of isdir
with isfolder in core Octave.
author | Rik <rik@octave.org> |
---|---|
date | Mon, 13 Aug 2018 12:17:58 -0700 |
parents | 6652d3823428 |
children | 00f796120a6d |
line wrap: on
line diff
--- a/scripts/miscellaneous/copyfile.m Mon Aug 13 11:41:17 2018 -0700 +++ b/scripts/miscellaneous/copyfile.m Mon Aug 13 12:17:58 2018 -0700 @@ -78,7 +78,7 @@ endif ## If f1 has more than 1 element then f2 must be a directory - isdir = (exist (f2, "dir") != 0); + isdir = isfolder (f2); if (numel (f1) > 1 && ! isdir) error ("copyfile: when copying multiple files, F2 must be a directory"); endif