Mercurial > hg > octave-lyh
comparison scripts/general/isdir.m @ 11469:c776f063fefe
Overhaul m-script files to use common variable name between code and documentation.
author | Rik <octave@nomad.inbox5.com> |
---|---|
date | Sun, 09 Jan 2011 12:41:21 -0800 |
parents | 0d9640d755b1 |
children | fd0a3ac60b0e |
comparison
equal
deleted
inserted
replaced
11468:e1edf0ba3bcb | 11469:c776f063fefe |
---|---|
20 ## @deftypefn {Function File} {} isdir (@var{f}) | 20 ## @deftypefn {Function File} {} isdir (@var{f}) |
21 ## Return true if @var{f} is a directory. | 21 ## Return true if @var{f} is a directory. |
22 ## @seealso{is_absolute_filename, is_rooted_relative_filename} | 22 ## @seealso{is_absolute_filename, is_rooted_relative_filename} |
23 ## @end deftypefn | 23 ## @end deftypefn |
24 | 24 |
25 function t = isdir (x) | 25 function retval = isdir (f) |
26 if (nargin == 1) | 26 if (nargin == 1) |
27 ## Exist returns an integer but isdir should return a logical. | 27 ## Exist returns an integer but isdir should return a logical. |
28 t = exist (x, "dir") == 7; | 28 retval = (exist (f, "dir") == 7); |
29 else | 29 else |
30 print_usage ("isdir"); | 30 print_usage ("isdir"); |
31 endif | 31 endif |
32 endfunction | 32 endfunction |