FileBlockingWork
Captures borrowed path backing and copied selection arguments.
Module std.fs
import std.fs;Public declaration contracts and authored examples. A page can document several related symbols. Implementation bodies are excluded.
pub init(Path: PathView, Mode: FileOpenMode, Links: LinkPolicy)
pub init(Path: PathView, Mode: FileOpenMode, Links: LinkPolicy)Captures borrowed path backing and copied selection arguments. Path: View loaned through worker completion. Mode: Copied data access/creation policy. Links: Copied final-component selection policy.
Invoke
pub readonly fn Invoke() -> Result<usize, IoError>Executes one safe platform operation; never retains any byte/path pointer. Return: Exact native result, without post-commit cancellation substitution.
pub init(Token: usize, Output: mut byte[])
pub init(Token: usize, Output: mut byte[])Captures one read's file token and borrowed writable destination. Copies the token and slice descriptor without scheduling, I/O or acquiring another file owner. The parent task retains the file and output-buffer loan through worker completion; moving this work value transfers no backing owner. Token: Held-file token copied from the parent operation's live owner. Output: Writable borrowed bytes kept live and available through completion.
Invoke
pub readonly fn Invoke() -> Result<usize, IoError>Executes one safe platform operation; never retains any byte/path pointer. Return: Exact native result, without post-commit cancellation substitution.
pub init(Token: usize, Input: readonly byte[])
pub init(Token: usize, Input: readonly byte[])Captures one write's file token and borrowed readonly source. Copies the token and slice descriptor without scheduling, I/O or acquiring another file owner. The parent task retains the file and input-buffer loan through worker completion; moving this work value transfers no backing owner. Token: Held-file token copied from the parent operation's live owner. Input: Readonly borrowed bytes whose backing remains live through completion.
Invoke
pub readonly fn Invoke() -> Result<usize, IoError>Executes one safe platform operation; never retains any byte/path pointer. Return: Exact native result, without post-commit cancellation substitution.
Create
pub static fn Create(Token: usize) -> FileSynchronizeWorkCreates copied handoff arguments without scheduling or I/O. Token: Authenticated held-object token borrowed through the parent task. Return: Independent Data arguments; the parent retains the original token owner.
Invoke
pub readonly fn Invoke() -> Result<void, IoError>Executes one safe platform operation; never retains any byte/path pointer. Return: Exact native result, without post-commit cancellation substitution.
Create
pub static fn Create(Token: usize, Offset: i64, Origin: SeekOrigin) -> FileSeekWorkCreates copied handoff arguments without scheduling or I/O. Token: Authenticated held-object token borrowed through the parent task. Offset: Signed byte offset interpreted relative to Origin. Origin: Declared byte-position origin for the requested seek. Return: Independent Data arguments; the parent retains the original token owner.
Invoke
pub readonly fn Invoke() -> Result<u64, IoError>Executes one safe platform operation; never retains any byte/path pointer. Return: Exact native result, without post-commit cancellation substitution.
Create
pub static fn Create(Token: usize) -> FileReadMetadataWorkCreates copied handoff arguments without scheduling or I/O. Token: Authenticated held-object token borrowed through the parent task. Return: Independent Data arguments; the parent retains the original token owner.
Invoke
pub readonly fn Invoke() -> Result<FileMetadata, IoError>Executes one safe platform operation; never retains any byte/path pointer. Return: Exact native result, without post-commit cancellation substitution.
Create
pub static fn Create(Token: usize) -> FileCloseWorkCreates copied handoff arguments without scheduling or I/O. Token: Authenticated held-object token borrowed through the parent task. Return: Independent Data arguments; the parent retains the original token owner.
Invoke
pub readonly fn Invoke() -> Result<void, IoError>Executes one safe platform operation; never retains any byte/path pointer. Return: Exact native result, without post-commit cancellation substitution.