MatrixBerryCore
TmpDataManager.m
Go to the documentation of this file.
1 classdef TmpDataManager<mxberry.io.TmpDataManager
2  methods (Static)
3  function setRootDir()
4  ANCHOR_FILE_NAME=mfilename('class');
5  curFilePath=which(ANCHOR_FILE_NAME);
6  if isempty(curFilePath)
7  mxberry.core.throwerror('anchorNotFound',...
8  sprintf('location of anchor file %s not found',...
9  curFilePath));
10  end
11  %
12  dirName=[mxberry.io.PathUtils.rmLastPathParts(...
13  curFilePath,3),...
14  filesep,'TTD'];
15  %
16  mxberry.io.TmpDataManager.setRootDir(dirName);
17  end
18  function resDir=getDirByKey(keyName)
19  mxberry.test.TmpDataManager.setRootDir();
20  %
21  resDir=mxberry.io.TmpDataManager.getDirByKey(keyName);
22  end
23  function resDir=getDirByCallerKey(keyName)
24  if nargin<1
25  keyName='';
26  end
27  mxberry.test.TmpDataManager.setRootDir();
28  resDir=mxberry.io.TmpDataManager.getDirByCallerKey(...
29  keyName,3);
30  end
31  end
32 end
function filesep()
TMPDATAMANAGER provides a basic functionality for managing temporary data folders, root folder name is determined automatically.
Definition: TmpDataManager.m:5
function throwerror(in msgTag, in varargin)
THROWERROR works similarly to built-in ERROR function in case when there is no output arguments but s...
TMPDATAMANAGER implements a basic functionality for managing temporary data folders.
Definition: TmpDataManager.m:5