Mercurial > repos > public > sbplib
diff findMfiles.m @ 456:cf313abea04b feature/grids
Merge
author | Jonatan Werpers <jonatan@werpers.com> |
---|---|
date | Fri, 12 May 2017 16:20:43 +0200 |
parents | cd571e8ec1fd |
children |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/findMfiles.m Fri May 12 16:20:43 2017 +0200 @@ -0,0 +1,14 @@ +% Find all m files reachable from folder d +function files = findMfiles(d) + contents = what(d); + + files = {}; + for i = 1:length(contents.m) + files{end+1} = fullfile(d, contents.m{i}); + end + + for i = 1:length(contents.packages) + packagePath = fullfile(d,['+' contents.packages{i}]); + files = [files, findMfiles(packagePath)]; + end +end \ No newline at end of file