-
Notifications
You must be signed in to change notification settings - Fork 33
Open
Description
Currently the API is:
-type contents() :: #{filename() => binary()}.
-type tarball() :: binary().
%% ...
-spec unpack(tarball(), memory) ->
{ok, #{checksum => checksum(), metadata => metadata(), contents => contents()}} |
{error, term()};
(tarball(), filename()) ->
{ok, #{checksum => checksum(), metadata => metadata()}} |
{error, term()}.so we are only able to accept binaries. I'm wondering if we should accept filenames too, so instead of binary() we accept {binary, binary()} | filename:filename() and deprecate the former? Eventually, at say v1.0, we'd accept {binary, binary()} | filename:filename_all().
This is a low-level library so I'm ok with pretty low level interface but I think this change would make it more convenient to use and I wish I'd have started with that.
Thoughts? cc @ferd @tsloughter
Metadata
Metadata
Assignees
Labels
No labels