MatrixBerryCore
getfileinfo.m
Go to the documentation of this file.
1 function [SInfo,isVersioned]=getfileinfo(fullFileName)
2 import mxberry.dev.scm.subversion.svncall;
3 import mxberry.dev.scm.subversion.getrevisionbypath;
4 rev=getrevisionbypath(fullFileName);
5 if strcmp(rev,'unversioned')
6  SInfo=struct();
7  isVersioned=false;
8 else
9  isVersioned=true;
10  propNameValueList=svncall(sprintf('info "%s@"',fullFileName));
11 
12  %
13  propNameValueCList=cellfun(@(x)strsplit(x,': '),...
14  propNameValueList(1:end-1),...
15  'UniformOutput',false);
16  propNameValueCMat=vertcat(propNameValueCList{:});
17  propNameValueCMat(:,1)=cellfun(@formFieldName,propNameValueCMat(:,1),...
18  'UniformOutput',false);
19  %
20  propNameValueCMat=transpose(propNameValueCMat);
21  %
22  SInfo=struct(propNameValueCMat{:});
23 end
24 end
25 function fieldName=formFieldName(inputStr)
26 fieldName=strrep(inputStr,' ','');
27 fieldName(1)=lower(fieldName(1));
28 end
function svncall(in ParamStr)
function getfileinfo(in fullFileName)
GETFILEINFO generates a structure with svn file methadata including revision, last modification date ...
function getrevisionbypath(in ReferencePath, in varargin)