Skip to content

Instantly share code, notes, and snippets.

@wiennat
Forked from ferryzhou/mkdir_if_not_exist.m
Created February 24, 2013 08:24
Show Gist options
  • Select an option

  • Save wiennat/5023111 to your computer and use it in GitHub Desktop.

Select an option

Save wiennat/5023111 to your computer and use it in GitHub Desktop.
function mkdir_if_not_exist(dirpath)
if dirpath(end) ~= '/', dirpath = [dirpath '/']; end
if (exist(dirpath, 'dir') == 0), mkdir(dirpath); end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment