Files
yatm/internal/executor/fileops/operation.go
T
Samuel CuiandClaude Opus 5.5 63eef7bea9 Keep disposable files under owned Work directories
Use the common temporary root for Library, Restore probes, Preview and script output. Preserve active ownership, ordinary outputs and retryable cleanup failures.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-30 00:01:27 +08:00

23 lines
545 B
Go

package fileops
import (
"context"
"github.com/samuelncui/yatm/internal/executor"
"github.com/samuelncui/yatm/internal/resource"
)
type operation struct {
*resource.TemporaryDB
exe *executor.Executor
}
func newOperation(ctx context.Context, exe *executor.Executor) (*operation, error) {
// The request owns its disposable manifest through result delivery.
temporary, err := resource.OpenTemporaryDB(exe.Paths().Work, "file-operation-")
if err != nil {
return nil, err
}
return &operation{TemporaryDB: temporary, exe: exe}, nil
}