flix

0.69.3

Fs.MemoryOverlay

Definitions

def append(path: String, data: String, lower: Option[String], o: MemoryOverlay[r]): Result[IoError, Unit] \ r Source

Appends text. lower is the current content from the lower layer (if not in overlay/whiteout).

def appendBytes(path: String, data: Vector[Int8], lower: Option[Vector[Int8]], o: MemoryOverlay[r]): Result[IoError, Unit] \ r Source

Appends bytes. lower is the current content from the lower layer.

def appendLines(path: String, lines: List[String], lower: Option[String], o: MemoryOverlay[r]): Result[IoError, Unit] \ r Source

Appends lines. lower is the current content from the lower layer.

def copy(src: String, dst: String, lower: Option[Vector[Int8]], o: MemoryOverlay[r]): Result[IoError, Unit] \ r Source

Copies an entry. lower is the source bytes from the lower layer if not in overlay.

def delete(path: String, o: MemoryOverlay[r]): Result[IoError, Unit] \ r Source

Deletes an entry (adds whiteout).

def fresh(rc: Region[r]): MemoryOverlay[r] \ r Source

Creates a fresh, empty overlay in region rc.

def glob(base: String, pattern: String, lower: Result[IoError, List[String]], o: MemoryOverlay[r]): Result[IoError, List[String]] \ r Source

Merges overlay entries with lower-layer glob results. lower is the result of globbing from the real filesystem.

def list(dir: String, lower: Result[IoError, List[String]], o: MemoryOverlay[r]): Result[IoError, List[String]] \ r Source

Merges overlay listing with lower-layer listing. lower is the result of listing from the real filesystem.

def mkDir(path: String, o: MemoryOverlay[r]): Result[IoError, Unit] \ r Source

Creates a directory.

def mkDirs(path: String, o: MemoryOverlay[r]): Result[IoError, Unit] \ r Source

Creates a directory and all parents.

def mkTempDir(prefix: String, o: MemoryOverlay[r]): Result[IoError, String] \ r Source

Generates a unique temp directory and registers it.

def move(src: String, dst: String, lower: Option[Vector[Int8]], o: MemoryOverlay[r]): Result[IoError, Unit] \ r Source

Moves an entry. lower is the source bytes from the lower layer if not in overlay.

def needsLower(path: String, o: MemoryOverlay[r]): Bool \ r Source

Returns true if the path needs lower-layer content (not in overlay, not whiteout'd).

def truncate(path: String, o: MemoryOverlay[r]): Result[IoError, Unit] \ r Source

Truncates a file (stores empty content).

def tryExists(path: String, o: MemoryOverlay[r]): Option[Result[IoError, Bool]] \ r Source

Overlay-aware exists check.

def tryIsDirectory(path: String, o: MemoryOverlay[r]): Option[Result[IoError, Bool]] \ r Source

Overlay-aware isDirectory check.

def tryIsExecutable(path: String, o: MemoryOverlay[r]): Option[Result[IoError, Bool]] \ r Source

Overlay-aware isExecutable. In-memory entries are never executable.

def tryIsReadable(path: String, o: MemoryOverlay[r]): Option[Result[IoError, Bool]] \ r Source

Overlay-aware isReadable. In-memory entries are always readable.

def tryIsRegularFile(path: String, o: MemoryOverlay[r]): Option[Result[IoError, Bool]] \ r Source

Overlay-aware isRegularFile check.

def tryIsWritable(path: String, o: MemoryOverlay[r]): Option[Result[IoError, Bool]] \ r Source

Overlay-aware isWritable. In-memory entries are always writable.

def tryRead(path: String, o: MemoryOverlay[r]): Option[Result[IoError, String]] \ r Source

Overlay-aware read (text).

def tryReadBytes(path: String, o: MemoryOverlay[r]): Option[Result[IoError, Vector[Int8]]] \ r Source

Overlay-aware readBytes.

def tryReadLines(path: String, o: MemoryOverlay[r]): Option[Result[IoError, List[String]]] \ r Source

Overlay-aware readLines.

def trySize(path: String, o: MemoryOverlay[r]): Option[Result[IoError, Size]] \ r Source

Overlay-aware size query. Computes from content length.

def tryTime(path: String, o: MemoryOverlay[r]): Option[Result[IoError, Int64]] \ r Source

Overlay-aware time query. In-memory entries return 0.

def write(path: String, data: String, o: MemoryOverlay[r]): Result[IoError, Unit] \ r Source

Stores text content.

def writeBytes(path: String, data: Vector[Int8], o: MemoryOverlay[r]): Result[IoError, Unit] \ r Source

Stores byte content.

def writeLines(path: String, lines: List[String], o: MemoryOverlay[r]): Result[IoError, Unit] \ r Source

Stores lines as text content.