getSettingFileFullPath.m 822 B

1234567891011121314151617181920212223242526272829
  1. function settingFileFullPath = getSettingFileFullPath(functionName)
  2. % settingFileFullPath
  3. %
  4. % Returns the full path of the settings file.
  5. %
  6. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  7. % Version History
  8. %
  9. % 1.0.0.0:
  10. % - Initial release.
  11. %
  12. % 1.1.0.0:
  13. % - Updated to support unix file system.
  14. %
  15. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  16. settingFileFullPath = which(functionName);
  17. if ~isempty(settingFileFullPath)
  18. settingFilePath = fileparts(settingFileFullPath);
  19. if ismac || isunix
  20. settingFileFullPath = [settingFilePath '/' functionName '.ini'];
  21. else
  22. settingFileFullPath = [settingFilePath '\' functionName '.ini'];
  23. end
  24. else
  25. disp('Function not valid.');
  26. settingFileFullPath = [];
  27. end