ScratchFileRef
Namespace: Meshmakers.Octo.Sdk.Common.EtlDataPipeline.Execution
Helpers to write and detect a ScratchFileReference in the data context.
A path holding a scratch reference is a JSON object with a non-empty
scratchFileToken; a path holding inline content is a plain base64 string — so
ScratchFileRef.TryRead(IDataContext, String, out ScratchFileReference) lets a node transparently accept either shape.
public static class ScratchFileRef
Inheritance Object → ScratchFileRef
Methods
Write(IDataContext, String, String, Int64, String, String)
Writes a scratch reference marker to path.
public static void Write(IDataContext dataContext, string path, string token, long length, string fileName, string contentType)
Parameters
dataContext IDataContext
path String
token String
length Int64
fileName String
contentType String
TryRead(IDataContext, String, out ScratchFileReference)
Reads a scratch reference at path. Returns false when the path is
absent or holds anything other than an object with a non-empty scratchFileToken
(e.g. a base64 string), so callers can fall back to inline handling.
public static bool TryRead(IDataContext dataContext, string path, out ScratchFileReference reference)
Parameters
dataContext IDataContext
path String
reference ScratchFileReference