1.3 KiB
1.3 KiB
COPY_V1_CONSOLIDATION.md
Task lifecycle (copy v1)
POST /api/files/copy:
- Request wordt gevalideerd.
- Bij geldige input wordt direct een task aangemaakt met status
queued. - Een achtergrond-runner zet de task op
runningen vult progress (done_bytes,total_bytes). - Eindstatus:
completedbij succesvolle file copyfailedbij runtime I/O fout (error_code = io_error)
Validatiefouten vs runtime-fouten
Validatiefouten (voor task-creatie):
invalid_requestpath_traversal_detectedpath_outside_whitelistinvalid_root_aliaspath_not_foundtype_conflictalready_exists
Gedrag:
- request faalt direct met error response
- er wordt geen task aangemaakt
Runtime-fouten (na task-creatie):
io_error
Gedrag:
- request zelf retourneert
202mettask_id - task gaat naar
failed - foutdetails verschijnen via
GET /api/tasks/{task_id}
Copy metadata in v1 (copy_file(...))
V1 kopieert:
- file-inhoud (byte stream)
- basic filesystem metadata via
copystat(mtime/atime/mode waar ondersteund)
V1 doet niet expliciet:
- ownership/ACL normalisatie
- extended attributes beleid
Destination-semantiek (expliciet)
destination blijft in v1 altijd het volledige doelpad.
- Geen impliciete "copy into existing directory" interpretatie.
- Als destination al bestaat:
already_exists.