Required Instance Methodtuist.filesystem 0.7.9FileSystem

readTextFile(at:encoding:)

Reads the file at a given path, decodes its content using the provided encoding, and returns the content as a String.

FileSystem.swift:143
func readTextFile(at: Path.AbsolutePath, encoding: String.Encoding) async throws -> String

Parameters

at

Path to the file to read.

encoding

The encoding of the content represented by the data.

Returns

The content of the file.