Replace calls to isdir by isfolder

isfolder is the modern replacement to isdir, and is available in MATLAB ⩾
R2017b and in Octave ⩾ 7.

Detected and automatically fixed by MATLAB Code Analyzer app.
covariance-quadratic-approximation
Sébastien Villemot 2023-12-15 15:39:36 +01:00
parent ff7cc9267e
commit 162ca815bc
No known key found for this signature in database
GPG Key ID: 2CECE9350ECEBE4A
3 changed files with 6 additions and 6 deletions

View File

@ -154,8 +154,8 @@ end
% Store results
DirectoryName = [ M_.dname '/bvar_forecast' ];
if ~isdir(DirectoryName)
if ~isdir(M_.dname)
if ~isfolder(DirectoryName)
if ~isfolder(M_.dname)
mkdir(M_.dname);
end
mkdir(DirectoryName);

View File

@ -130,7 +130,7 @@ end
% Save intermediate results
DirectoryName = [ M_.dname '/bvar_irf' ];
if ~isdir(DirectoryName)
if ~isfolder(DirectoryName)
mkdir('.',DirectoryName);
end
save([ DirectoryName '/simulations.mat'], 'sampled_irfs');
@ -146,4 +146,4 @@ for i=1:ny
oo_.bvar.irf.Upper_bound.(variable_name).(shock_name) = posterior_up_conf_irfs(j,i,:);
oo_.bvar.irf.Lower_bound.(variable_name).(shock_name) = posterior_down_conf_irfs(j,i,:);
end
end
end

View File

@ -33,7 +33,7 @@ info = 0;
DirectoryName = [ dname '/' type ]; % don't use filesep as it will create issues with LaTeX on Windows
if ~isdir(dname)
if ~isfolder(dname)
% Make sure there isn't a file with the same name, see trac ticket #47
if isfile(dname)
delete(dname)
@ -41,7 +41,7 @@ if ~isdir(dname)
mkdir('.', dname);
end
if ~isdir(DirectoryName)
if ~isfolder(DirectoryName)
% Make sure there isn't a file with the same name, see trac ticket #47
if isfile(DirectoryName)
delete(DirectoryName)