- All Known Implementing Classes:
CapturingFileSink,LocalFileSink,NoOpFileSink
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
Abstraction over the
CreateFileCommand side effect.
Keeping this as an interface lets the embedding application decide whether files are written to disk, captured in memory, uploaded to object storage, or rejected entirely. The runtime never assumes a filesystem.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final FileSinkShared singletonNoOpFileSinkthat accepts writes but performs no I/O. -
Method Summary
-
Field Details
-
NO_OP_FILE_SINK
Shared singletonNoOpFileSinkthat accepts writes but performs no I/O.
-
-
Method Details
-
write
Accept a file produced by an agent. Implementations are responsible for their own path-traversal protection when the target is a real filesystem.- Parameters:
runId- id of the owning run — useful for scoping outputs per runstepId- id of the producing steppath- the path the agent requestedcontent- the file content
-