This is a static copy of a profile reportHome
imagesci/private/getFileFromURL (4 calls, 0.000 sec)
Generated 05-Aug-2011 13:01:17 using cpu time.
function in file /usr/local/MATLAB/R2011a/toolbox/matlab/imagesci/private/getFileFromURL.m
Copy to new window for comparing multiple runs
Parents (calling functions)
Function Name | Function Type | Calls |
imfinfo | function | 4 |
Lines where the most time was spent
No measurable time spent in this functionLine Number | Code | Calls | Total Time | % Time | Time Plot |
30 | end | 4 | 0 s | 0% |  |
28 | filenameOut = filenameIn; | 4 | 0 s | 0% |  |
27 | isUrl = false; | 4 | 0 s | 0% |  |
25 | else | 4 | 0 s | 0% |  |
9 | if (strfind(filenameIn, '://')... | 4 | 0 s | 0% |  |
All other lines | | | 0 s | 0% |  |
Totals | | | 0 s | 0% | |
Children (called functions)
No childrenCode Analyzer results
Line number | Message |
20 | Best practice is for CATCH to be followed by an identifier that gets the error information. |
Coverage results
[ Show coverage for parent directory ]
Total lines in function | 30 |
Non-code lines (comments, blank lines) | 16 |
Code lines (lines that can run) | 14 |
Code lines that did run | 5 |
Code lines that did not run | 9 |
Coverage (did run/can run) | 35.71 % |
Function listing
time calls line
1 function [isUrl, filenameOut] = getFileFromURL(filenameIn)
2 %GETFILEFROMURL Detects whether the input filename is a URL and downloads
3 %file from the URL
4
5 % Copyright 2007 The MathWorks, Inc.
6 % $Revision: 1.1.6.1 $ $Date: 2007/03/27 19:14:42 $
7
8 % Download remote file.
4 9 if (strfind(filenameIn, '://'))
10
11 isUrl = true;
12
13 if (~usejava('jvm'))
14 error('MATLAB:getFileFromURL:noJVM', ...
15 'Reading from a URL requires a Java Virtual Machine.')
16 end
17
18 try
19 filenameOut = urlwrite(filenameIn, tempname);
20 catch
21 error('MATLAB:getFileFromURL:urlRead', ...
22 'Can''t read URL "%s".', filenameIn);
23 end
24
4 25 else
26
4 27 isUrl = false;
4 28 filenameOut = filenameIn;
29
4 30 end