Adds Store.Import, the copy off a card that #5 asks for, built to the plan on that issue and the ruling at #4 (comment).
Each file goes to dest/YYYY-MM-DD/<file name>, from the new Object.ModTime. A file group stays in the folder of its primary member.
Each copy is read back and compared by SHA256. A copy that fails or differs is removed and reported.
ImportResult lists Copied, Skipped and Conflicts by destination path.
What the diff does not show:
A conflict is not an error, so a nil error does not mean every file was copied. The README says so.
A file is read three times: hashed, copied, then the written file is hashed. The test for a corrupted write relies on that order.
A cancelled import leaves any day folder it already created, empty or not.
Disclosures:
Judgement call: copies get mode 0600 and day folders 0750. The plan names no mode, and the linter rejects wider ones.
Judgement call: a file at the path that cannot be read is an error, not a conflict.
Judgement call: a directory or symlink at the path is a conflict, and a symlink is not followed.
Deviation: the README's first sentence now also says the library copies files, which the brief did not list.
Left alone: the README line saying dcf does not work yet. That status note is the owner's to retire.
Model: opus-5-5
Adds `Store.Import`, the copy off a card that https://git.eeqj.de/sneak/dcf/issues/5 asks for, built to the plan on that issue and the ruling at https://git.eeqj.de/sneak/dcf/issues/4#issuecomment-145367.
- Each file goes to `dest/YYYY-MM-DD/<file name>`, from the new `Object.ModTime`. A file group stays in the folder of its primary member.
- Each copy is read back and compared by SHA256. A copy that fails or differs is removed and reported.
- `ImportResult` lists `Copied`, `Skipped` and `Conflicts` by destination path.
What the diff does not show:
- A conflict is not an error, so a nil error does not mean every file was copied. The README says so.
- A file is read three times: hashed, copied, then the written file is hashed. The test for a corrupted write relies on that order.
- A cancelled import leaves any day folder it already created, empty or not.
Disclosures:
- Judgement call: copies get mode `0600` and day folders `0750`. The plan names no mode, and the linter rejects wider ones.
- Judgement call: a file at the path that cannot be read is an error, not a conflict.
- Judgement call: a directory or symlink at the path is a conflict, and a symlink is not followed.
- Deviation: the README's first sentence now also says the library copies files, which the brief did not list.
- Left alone: the README line saying `dcf` does not work yet. That status note is the owner's to retire.
Model: opus-5-5
Store.Import copies every member of every file group and the images
and videos under PRIVATE/M4ROOT to dest/YYYY-MM-DD/<file name>. The day
comes from the new Object.ModTime. A file group stays in the folder of
its primary member.
Each copy is read back and compared by SHA256. A file with the same
hash already there is skipped, and anything else there is a conflict
and left alone. One failed file does not stop the others. A cancelled
context stops at once and removes the partial copy.
Object.Hash now shares its reading code with the import.
Model: opus-5-5
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Adds
Store.Import, the copy off a card that #5 asks for, built to the plan on that issue and the ruling at #4 (comment).dest/YYYY-MM-DD/<file name>, from the newObject.ModTime. A file group stays in the folder of its primary member.ImportResultlistsCopied,SkippedandConflictsby destination path.What the diff does not show:
Disclosures:
0600and day folders0750. The plan names no mode, and the linter rejects wider ones.dcfdoes not work yet. That status note is the owner's to retire.Model: opus-5-5
View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.