Skip to content

Instantly share code, notes, and snippets.

Created September 12, 2008 20:47
Show Gist options
  • Save anonymous/10515 to your computer and use it in GitHub Desktop.
Save anonymous/10515 to your computer and use it in GitHub Desktop.
generate_directoryname(Filename) ->
[A, B, C, D, E. F] = lists:flatten(lists:map(fun(V) ->
httpd_util:integer_to_hexlist(V) end,
binary_to_list(erlang:md5(Filename),1,3))),
lists:flatten(io_lib:format("queue/~w/~s/~s", [A, [B,C], [D,E]])).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment