Mercurial > hg > octave-nkf
comparison scripts/general/isdir.m @ 6861:32558239ed9e
[project @ 2007-09-05 06:15:01 by jwe]
author | jwe |
---|---|
date | Wed, 05 Sep 2007 06:15:01 +0000 |
parents | 27c966e4b2dc |
children | 93c65f2a5668 |
comparison
equal
deleted
inserted
replaced
6860:8057825b748f | 6861:32558239ed9e |
---|---|
22 ## Return true if @var{f} is a directory. | 22 ## Return true if @var{f} is a directory. |
23 ## @end deftypefn | 23 ## @end deftypefn |
24 | 24 |
25 function t = isdir (x) | 25 function t = isdir (x) |
26 if (nargin == 1) | 26 if (nargin == 1) |
27 t = exist (x, "dir"); | 27 ## Exist returns an integer but isdir should return a logical. |
28 t = exist (x, "dir") == 7; | |
28 else | 29 else |
29 print_usage ("isdir"); | 30 print_usage ("isdir"); |
30 endif | 31 endif |
31 endfunction | 32 endfunction |