FileTrees.jl icon indicating copy to clipboard operation
FileTrees.jl copied to clipboard

`save` API is a bit unintuitive

Open JeffBezanson opened this issue 5 years ago • 2 comments

Really nice package! Just taking a close look at the API.

save is a bit odd to me since it doesn't actually save anything unless the function you pass also calls save. Some possible ideas:

  • Make save(path(file), file.value) the default.
  • Call it foreach instead.
  • Something else?

JeffBezanson avatar Aug 15 '20 19:08 JeffBezanson

Call it foreach instead.

I like this the most!

shashi avatar Aug 15 '20 19:08 shashi

But then save also creates the right paths with mkpath before allowing you to write to that path...

shashi avatar Aug 15 '20 23:08 shashi