Skip to content

Instantly share code, notes, and snippets.

@AeroNotix
Created May 14, 2014 09:35
Show Gist options
  • Save AeroNotix/149ec79295c30f5bb3ab to your computer and use it in GitHub Desktop.
Save AeroNotix/149ec79295c30f5bb3ab to your computer and use it in GitHub Desktop.
-spec
gather_child_data(pid(), string(), [binary()]) -> [binary()].
gather_child_data(Conn, Path, ChildPaths) ->
[begin
BinPath = list_to_binary(Path ++ "/"),
NewPath = binary_to_list(<<BinPath/binary, Child/binary>>),
{ok, {NodeData, _}} = ezk:get(Conn, NewPath),
NodeData
end || Child <- ChildPaths].
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment