mdbfileonpath>checkIfShadowed (1 call, 0.030 sec)
Generated 14-Nov-2016 07:47:08 using cpu time.
nested function in file /usr/local/MATLAB/MATLAB_Production_Server/R2015a/toolbox/matlab/codetools/mdbfileonpath.m
Copy to new window for comparing multiple runs
Function Name | Function Type | Calls |
mdbfileonpath | function | 1 |
Line Number | Code | Calls | Total Time | % Time | Time Plot |
112 | xfiletorun = getFileToRun(inFi... | 1 | 0.010 s | 33.3% | ![]() |
111 | [path, fn, ext] = filepartsWit... | 1 | 0.010 s | 33.3% | ![]() |
138 | end | 1 | 0 s | 0% | ![]() |
123 | shadowStatus = PathUpdateDialo... | 1 | 0 s | 0% | ![]() |
121 | fullpath = xfiletorun; | 1 | 0 s | 0% | ![]() |
All other lines | 0.010 s | 33.3% | ![]() | ||
Totals | 0.030 s | 100% |
Function Name | Function Type | Calls | Total Time | % Time | Time Plot |
mdbfileonpath>getFileToRun | subfunction | 1 | 0.010 s | 33.3% | ![]() |
mdbfileonpath>filepartsWithoutPackages | subfunction | 2 | 0.010 s | 33.3% | ![]() |
mdbfileonpath>areFilenamesEqual | subfunction | 2 | 0 s | 0% | ![]() |
mdbfileonpath>areDirectoriesEqual | subfunction | 1 | 0 s | 0% | ![]() |
Self time (built-ins, overhead, etc.) | 0.010 s | 33.3% | ![]() | ||
Totals | 0.030 s | 100% |
Total lines in function | 29 |
Non-code lines (comments, blank lines) | 8 |
Code lines (lines that can run) | 21 |
Code lines that did run | 9 |
Code lines that did not run | 12 |
Coverage (did run/can run) | 42.86 % |
time | calls | line | |
---|---|---|---|
110 | function [shadowStatus, fullpath] = checkIfShadowed(inFilename) | ||
0.01 | 1 | 111 | [path, fn, ext] = filepartsWithoutPackages(inFilename); |
0.01 | 1 | 112 | xfiletorun = getFileToRun(inFilename); |
113 | import com.mathworks.mlwidgets.dialog.PathUpdateDialog; | ||
1 | 114 | if ~isempty(xfiletorun) | |
1 | 115 | [xpath, xfn, xext] = filepartsWithoutPackages(xfiletorun); | |
1 | 116 | arePathsEqual = areDirectoriesEqual(xpath, path, resolveSymbolicLinks); | |
117 | |||
1 | 118 | if arePathsEqual && areFilenamesEqual(xfn, fn) && ... | |
119 | areFilenamesEqual(xext, ext) | ||
120 | % The executable fileparts are identical to the file passed in | ||
1 | 121 | fullpath = xfiletorun; | |
122 | % MATLAB will run the file | ||
1 | 123 | shadowStatus = PathUpdateDialog.FILE_WILL_RUN; | |
124 | elseif ~arePathsEqual || (~areFilenamesEqual(xfn, fn) && areFilenamesEqual(xext, ext)) | ||
125 | % If paths are equal, can only happen on unix: eg foo.m and FOO.m. | ||
126 | fullpath = xfiletorun; | ||
127 | if areDirectoriesEqual(xpath, pwd, resolveSymbolicLinks) | ||
128 | shadowStatus = PathUpdateDialog.FILE_SHADOWED_BY_PWD; | ||
129 | else | ||
130 | % shadower on path | ||
131 | shadowStatus = PathUpdateDialog.FILE_SHADOWED_BY_TBX; | ||
132 | end | ||
133 | end | ||
134 | else | ||
135 | fullpath = inFilename; | ||
136 | shadowStatus = PathUpdateDialog.FILE_NOT_ON_PATH; | ||
137 | end | ||
1 | 138 | end |
Other subfunctions in this file are not included in this listing.