Save and delete files in an aindrive drive without overwriting another change (#2)
CI / checks (push) Successful in 38s

This commit was merged in pull request #2.
This commit is contained in:
2026-10-13 21:54:06 +00:00
parent 7de6ea810c
commit e5bf47634b
6 changed files with 619 additions and 54 deletions
+21 -8
View File
@@ -27,15 +27,28 @@ that machine runs aindrive; until then they report the folder unavailable.
## What works
Browsing folders and reading files. aindrive reads a file whole, at most
8 MiB at a time, so a larger file is refused as unsupported rather than cut
short. A read is checked against the size the drive reported a moment before,
so a file that changes in between is a conflict rather than a mix of two
versions. Names the drive's machine allows but Memona cannot show, such as one
containing a backslash, are left out of listings.
Browsing folders, and reading, saving and deleting files. A token generated
as **Read only** opens the drive read-only.
Saving, creating folders, renaming and deleting are not supported yet, and
neither is change polling.
aindrive reads a file whole, at most 8 MiB at a time, so a larger file is
refused as unsupported rather than cut short. A read is checked against the
size the drive reported a moment before, so a file that changes in between is
a conflict rather than a mix of two versions.
A save sends the file whole, up to 1 MiB, the most Memona saves in one
transfer. It names the revision it was read at, and aindrive compares and
writes under one lock, so a file someone changed since is reported as a
conflict instead of being overwritten. A save into a folder that does not
exist yet creates that folder, as aindrive does.
Deleting takes one file. A folder is refused: aindrive deletes a folder with
everything in it, and leaves some entries, such as `.git`, out of every
listing, so a folder cannot be shown to be empty first.
Creating folders, renaming and change polling are not supported, since the
drive's MCP endpoint offers no tool for them. Names the drive's machine allows
but Memona cannot show, such as one containing a backslash, are left out of
listings.
## Building