## Copyright (C) 2016 Mike Miller ## ## This file is part of Octave. ## ## Octave is free software; you can redistribute it and/or modify it ## under the terms of the GNU General Public License as published by ## the Free Software Foundation; either version 3 of the License, or (at ## your option) any later version. ## ## Octave is distributed in the hope that it will be useful, but ## WITHOUT ANY WARRANTY; without even the implied warranty of ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ## General Public License for more details. ## ## You should have received a copy of the GNU General Public License ## along with Octave; see the file COPYING. If not, see ## . ## -*- texinfo -*- ## @deftypefn {} {} doc_cache_valid (@var{file}) ## Checks whether @var{file} is a valid Octave "doc-cache" file. ## @seealso{lookfor} ## @end deftypefn function retval = doc_cache_valid (file) if (nargin != 1) print_usage (); endif try vars = whos ("-file", file); retval = ((numel (vars) == 1) && (vars(1).name == "cache") && (vars(1).class == "cell") && (vars(1).size(1) == 3)); catch retval = false; end_try_catch endfunction