MatrixBerryCore
rmdir.m
Go to the documentation of this file.
1 function [isSuccess,msgStr,messageId]=rmdir(dirName,sFlag)
2 try
3  if nargin<=1
4  mxberry.io.FileUtils.removeDirectory(dirName);
5  else
6  mxberry.core.checkvar(sFlag,@(x)ischar(x)&&strcmp(x,'s'));
7  mxberry.io.FileUtils.removeDirectoryRecursively(dirName);
8  end
9  isSuccess=true;
10  msgStr='';
11  messageId='';
12  %
13 catch meObj
14  if nargout==0
15  rethrow(meObj)
16  else
17  isSuccess=false;
18  msgStr=meObj.message;
19  messageId=meObj.identifier;
20  end
21 end
function rmdir(in dirName, in sFlag)
RMDIR removes a directory (optionally recursively)