Skip to main content

release_owned_original

Function release_owned_original 

Source
pub fn release_owned_original<V: StorageVerifier + ?Sized>(
    db: &DatabaseDriver,
    verifier: &V,
    asset_id: Uuid,
    local_path: &Path,
    blob_hashes: &[Hash32],
    verify_asset_accepted: bool,
) -> Result<ReleaseDecision, Error>
Expand description

Device-owned-original release (the cache-eviction sweep’s counterpart for owned originals, which cache_sweep never touches automatically). An original the device itself uploaded is the source of truth until the server durably holds it; it is released — its local file deleted and its owned-original representation row dropped, after which it becomes an ordinary server-only, re-fetchable asset — only on a Release decision. On any Retain the file and row are untouched.