Removes the dot and dotdot directories from a list of directories.

0

Description

function [output] = remove_dots(input)
% Removes the . and .. directories from the input structure array.

output = input(find(~cellfun(@cmp_dots,{input(:).name})));
 
 function [result] = cmp_dots(input)
 if(strcmp(input,'.') || strcmp(input,'..'))
 result = 1;
 else
 result = 0;
 end
 end

end

Reviews

There are no reviews yet.

Be the first to review “Removes the dot and dotdot directories from a list of directories.”

Your email address will not be published. Required fields are marked *

Category: