Home > FMAToolbox > Database > DBExternalStoragePath.m

DBExternalStoragePath

PURPOSE ^

DBExternalStoragePath - Get path for database external storage space.

SYNOPSIS ^

function storage = DBExternalStoragePath

DESCRIPTION ^

DBExternalStoragePath - Get path for database external storage space.

  This is an 'internal' function used by FMAToolbox. You should not need
  to use it, unless you are developping new functions for this toolbox.

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

0001 function storage = DBExternalStoragePath
0002 
0003 %DBExternalStoragePath - Get path for database external storage space.
0004 %
0005 %  This is an 'internal' function used by FMAToolbox. You should not need
0006 %  to use it, unless you are developping new functions for this toolbox.
0007 
0008 
0009 % Copyright (C) 2016 by Michaƫl Zugaro
0010 %
0011 % This program is free software; you can redistribute it and/or modify
0012 % it under the terms of the GNU General Public License as published by
0013 % the Free Software Foundation; either version 3 of the License, or
0014 % (at your option) any later version.
0015 
0016 global SETTINGS;
0017 if ~isfield(SETTINGS,'dbExternalStoragePath'),
0018     error('External storage path for databases not set (type ''help <a href="matlab:help Database">Database</a>'' for details).');
0019 end
0020 storage = SETTINGS.dbExternalStoragePath;
0021 if ~isdir(storage),
0022     error(['External storage path ''' storage ''' does not exist (type ''help <a href="matlab:help Database">Database</a>'' for details).']);
0023 end
0024 name = '.test';
0025 if ~mkdir(storage,name),
0026     error(['External storage path ''' storage ''' is not writable (type ''help <a href="matlab:help Database">Database</a>'' for details).']);
0027 end
0028 rmdir([storage '/' name]);

Generated on Fri 16-Mar-2018 13:00:20 by m2html © 2005