kowainik / hash-store

Hash as cache
https://kowainik.github.io/projects/hash-store
Mozilla Public License 2.0
2 stars 1 forks source link

Create all parent directories #9

Open chshersh opened 6 years ago

chshersh commented 6 years ago

hashStore function fails if executed with arguments like this:

hashStore "dir" action ("src/Some/Module/Name.hs", ...)

I guess It should create all directories for file name.

chshersh commented 6 years ago

Creating directories is tricky... For example, which file should I create for foo/bar?

  1. hash-foo/bar
  2. foo/hash-bar

If second one, then property in documentation becomes more verbose...

int-index commented 6 years ago

I don't think that the store must allow any file hierarchy. If that was the goal, then the input should be Tree (String, ByteString) instead, it's a completely different model.