Minga.FileRef (Minga v0.1.0)

Copy Markdown View Source

Stable identity for a logical file path.

File tabs should compare the file they represent, not their display label. The label is usually a basename and can collide across directories, while a file ref stores the normalized path used by buffer processes.

Summary

Functions

Builds a file reference from a filesystem path.

Returns true when two file references identify the same logical file.

Types

t()

@type t() :: %Minga.FileRef{path: String.t()}

Functions

new(path)

@spec new(String.t()) :: t()

Builds a file reference from a filesystem path.

same?(file_ref1, file_ref2)

@spec same?(t(), t()) :: boolean()

Returns true when two file references identify the same logical file.