EditorConfig.FileSystem.Memory (EditorConfig v0.1.0)

Copy Markdown View Source

In-memory filesystem for tests and embedders.

Summary

Types

t()

@type t() :: %EditorConfig.FileSystem.Memory{files: %{required(Path.t()) => binary()}}

Functions

exists?(memory, path)

@spec exists?(t(), Path.t()) :: boolean()

new(files)

@spec new(%{required(Path.t()) => binary()}) :: t()

read(memory, path)

@spec read(t(), Path.t()) :: {:ok, binary()} | {:error, :enoent}