process_file

Types

pub opaque type Message

A reference to the process file manager. This can be used to register ownership of file paths using the register function.

pub opaque type ProcessFileManager

Values

pub fn register(
  manager: ProcessFileManager,
  ownership_of new_path: String,
) -> Result(Nil, Nil)

Register a file system path as being owned by the process that calls this function, so when the process exits the process file manager will delete any file or directory at the path. If there is no file at that location then nothing happens.

The first time a process calls this function they will be registered by the manager process, but subsequent calls work directly with ETS and do not produce any work for the manager.

pub fn start() -> Result(
  actor.Started(ProcessFileManager),
  actor.StartError,
)

Create a new process file manager. Typically you should use the supervised function instead of this one, adding it to your application’s supervision tree.

pub fn supervised() -> supervision.ChildSpecification(
  ProcessFileManager,
)

A supervision specification for a new process file manager.

Search Document