struct

FunctionalCrtemp::Info

Inherits Struct < Value < Object

Value-like wrapper around the existing Crtemp class that exposes a small, composable API: create, with_crtemp, remove, and create_tempfile. This keeps side effects in one place while presenting a simpler functional usage pattern.

Constructors

new(crtemp : Crtemp)
Source

Instance methods

close

Close (remove) the underlying crtemp; idempotent via Crtemp#close

Source
create_tempfile(prefix : String, data : Slice(UInt8) | Nil = nil) : CrtempResult::Result(String, Crtemp::Error)

Create a temporary file using the shared TempfileCreator logic Returns a CrtempResult::Result(String, Crtemp::Error)

Source
crtemp

Keep the underlying Crtemp instance; expose path via method

Source
each
Source
entries
Source
path
Source
read

Delegate a small set of Dir-like methods to the underlying Crtemp to make FunctionalCrtemp::Info act like a drop-in for many callers. These keep the functional API available while reducing required call-site changes.

Source