This is a static copy of a profile report

Home

fullfile (11 calls, 0.010 sec)
Generated 14-Nov-2016 07:47:06 using cpu time.
function in file /usr/local/MATLAB/MATLAB_Production_Server/R2015a/toolbox/matlab/iofun/fullfile.m
Copy to new window for comparing multiple runs

Parents (calling functions)

Function NameFunction TypeCalls
mdbfileonpathfunction5
graphics/private/namefunction6
Lines where the most time was spent

Line NumberCodeCallsTotal Time% TimeTime Plot
37
if nargin == 1
110.010 s100.0%
63
end
110 s0%
59
f = refinePath(f,fileSeparator...
110 s0%
58
end
110 s0%
57
end
110 s0%
All other lines  0 s0%
Totals  0.010 s100% 
Children (called functions)

Function NameFunction TypeCallsTotal Time% TimeTime Plot
fullfile>refinePathsubfunction110 s0%
fullfile>ensureTrailingFilesepsubfunction110 s0%
Self time (built-ins, overhead, etc.)  0.010 s100.0%
Totals  0.010 s100% 
Code Analyzer results
No Code Analyzer messages.
Coverage results
Show coverage for parent directory
Total lines in function63
Non-code lines (comments, blank lines)28
Code lines (lines that can run)35
Code lines that did run26
Code lines that did not run9
Coverage (did run/can run)74.29 %
Function listing
time 
calls 
 line
   1 
function f = fullfile(varargin)
   2 
%FULLFILE Build full file name from parts.
   3 
%   F = fullfile(FOLDERNAME1, FOLDERNAME2, ..., FILENAME) builds a full
   4 
%   file specification F from the folders and file name specified. Input
   5 
%   arguments FOLDERNAME1, FOLDERNAME2, etc. and FILENAME can be strings,
   6 
%   a scalar cell string, or same-sized cell arrays of strings. The output
   7 
%   of fullfile is conceptually equivalent to
   8 
%
   9 
%      F = [FOLDERNAME1 filesep FOLDERNAME2 filesep ... filesep FILENAME]
  10 
%
  11 
%   except that care is taken to handle the cases when the folders begin or
  12 
%   end with a file separator.
  13 
%
  14 
%   Examples
  15 
%     % To build platform dependent paths to files:
  16 
%        fullfile(matlabroot,'toolbox','matlab','general','Contents.m')
  17 
%
  18 
%     % To build platform dependent paths to a folder:
  19 
%        fullfile(matlabroot,'toolbox','matlab',filesep)
  20 
%
  21 
%     % To build a collection of platform dependent paths to files:
  22 
%        fullfile(toolboxdir('matlab'),'iofun',{'filesep.m';'fullfile.m'})
  23 
%
  24 
%   See also FILESEP, PATHSEP, FILEPARTS.
  25 

  26 
%   Copyright 1984-2014 The MathWorks, Inc.
  27 
    
     11 
  28 
    narginchk(1, Inf); 
     11 
  29 
    persistent fileSeparator; 
     11 
  30 
    if isempty(fileSeparator) 
  31 
        fileSeparator = filesep;
  32 
    end
     11 
  33 
    argIsACell = cellfun('isclass', varargin, 'cell'); 
     11 
  34 
    theInputs = varargin; 
     11 
  35 
    f = theInputs{1}; 
     11 
  36 
    try 
  0.01 
     11 
  37 
        if nargin == 1 
  38 
            f = refinePath(f, fileSeparator);
  39 
            return;
     11 
  40 
        elseif any(argIsACell) 
  41 
            theInputs(cellfun(@(x)~iscell(x)&&isempty(x), theInputs)) = [];
     11 
  42 
        else 
     11 
  43 
            theInputs(cellfun('isempty', theInputs)) = ''; 
     11 
  44 
        end 
  45 
        
     11 
  46 
        if length(theInputs)>1 
     11 
  47 
            theInputs{1} = ensureTrailingFilesep(theInputs{1}, fileSeparator); 
     11 
  48 
        end 
     11 
  49 
        if ~isempty(theInputs) 
     11 
  50 
            theInputs(2,:) = {fileSeparator}; 
     11 
  51 
            theInputs{2,1} = ''; 
     11 
  52 
            theInputs(end) = ''; 
     11 
  53 
            if any(argIsACell) 
  54 
                f = strcat(theInputs{:});
     11 
  55 
            else 
     11 
  56 
                f = [theInputs{:}]; 
     11 
  57 
            end 
     11 
  58 
        end 
     11 
  59 
        f = refinePath(f,fileSeparator); 
  60 
    catch exc
  61 
        locHandleError(exc, theInputs(1,:));
  62 
    end
     11 
  63 
end 

Other subfunctions in this file are not included in this listing.