UTS-eResearch / ocfl-js

node.js library for creating and manipulating Oxford Common File Layout repositories
2 stars 1 forks source link

Add one file at a time to object #11

Open spikelynch opened 5 years ago

spikelynch commented 5 years ago

We've now got two ways to populate an ocfl object - import a directory, and build a directory with a callback which gets passed the deposit target directory. Both of these require the whole object contents to be in place before running the hash algorithm over them to build the manifest.

Third alternative: add a file at a time to an object, hashing as we go. This will be useful for using ocfl objects as data capture targets and also for things like collaboration. Issues to work out - do we have a commit operation? How do we distinguish which version a new file is going into?

ptsefton commented 5 years ago

We'll need to have some kind of add files to a temp object one at a time and commit to deal with the versioning otherwise you'd get a lot of versions!