Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
dynare
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Minje Jeon
dynare
Commits
fd5742a3
Commit
fd5742a3
authored
11 years ago
by
Stéphane Adjemian
Browse files
Options
Downloads
Patches
Plain Diff
Add a second output argument to CheckPath nonzero iff the routine creates a new directory.
parent
08199dc8
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
matlab/CheckPath.m
+7
-3
7 additions, 3 deletions
matlab/CheckPath.m
with
7 additions
and
3 deletions
matlab/CheckPath.m
+
7
−
3
View file @
fd5742a3
function
DirectoryName
=
CheckPath
(
type
,
dname
)
function
[
DirectoryName
,
info
]
=
CheckPath
(
type
,
dname
)
% Creates the subfolder "./M_.dname/type" if it does not exist yet.
%
% INPUTS
...
...
@@ -6,12 +6,13 @@ function DirectoryName = CheckPath(type,dname)
% dname [string] Name of the directory
%
% OUTPUTS
% none.
% DirectoryName string, name of the directory (with path).
% info integer scalar, equal to 1 if the routine creates directory dname/type, zero otherwise.
%
% SPECIAL REQUIREMENTS
% none
% Copyright (C) 2005-201
2
Dynare Team
% Copyright (C) 2005-201
3
Dynare Team
%
% This file is part of Dynare.
%
...
...
@@ -28,6 +29,8 @@ function DirectoryName = CheckPath(type,dname)
% You should have received a copy of the GNU General Public License
% along with Dynare. If not, see <http://www.gnu.org/licenses/>.
info
=
0
;
DirectoryName
=
[
dname
'/'
type
];
if
~
isdir
(
dname
)
...
...
@@ -44,4 +47,5 @@ if ~isdir(DirectoryName)
delete
(
DirectoryName
)
end
mkdir
(
'.'
,
DirectoryName
);
info
=
1
;
end
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment