Skip to content

Instantly share code, notes, and snippets.

Avatar
:octocat:
Fighting software entropy

Roberto Aloi robertoaloi

:octocat:
Fighting software entropy
View GitHub Profile
View gist:4130202
%% Recursively copy directories
-spec recursive_copy(list(), list()) -> ok.
recursive_copy(From, To) ->
{ok, Files} = file:list_dir(From),
[ok = rec_copy(From, To, X) || X <- Files],
ok.
-spec rec_copy(list(), list(), list()) -> ok.
rec_copy(_From, _To, [$. | _T]) -> %% Ignore Hidden
ok;