Instance Methodtuist.filesystem 0.7.9FileSystem
writeText(_:at:options:)
FileSystem.swift:752func writeText(_ text: String, at path: AbsolutePath, options: Set<WriteTextOptions>) async throws
func writeText(_ text: String, at path: AbsolutePath, options: Set<WriteTextOptions>) async throws
s10FileSystemAAV9writeText_2at7optionsySS_4Path08AbsoluteG0VShyAA05WriteD7OptionsOGtYaKF
What are these?5BGPE
import FileSystem
struct FileSystem
@frozen struct String
A Unicode string value that is a collection of characters.
struct AbsolutePath
@frozen struct Set<Element> where Element : Hashable
An unordered collection of unique elements.
enum WriteTextOptions
Options to configure the writing of text files.
init(environmentVariables: [String : String] = ProcessInfo.processInfo.environment, logger: Logger? = nil)
func copy(_ from: AbsolutePath, to: AbsolutePath) async throws
func createSymbolicLink(from: AbsolutePath, to: RelativePath) async throws
func createSymbolicLink(from: AbsolutePath, to: AbsolutePath) async throws
func currentWorkingDirectory() async throws -> AbsolutePath
func exists(_ path: AbsolutePath) async throws -> Bool
func exists(_ path: AbsolutePath, isDirectory: Bool) async throws -> Bool
func fileSizeInBytes(at path: AbsolutePath) async throws -> Int64?
func glob(directory: Path.AbsolutePath, include: [String]) throws -> AnyThrowingAsyncSequenceable<Path.AbsolutePath>
func locateTraversingUp(from: AbsolutePath, relativePath: RelativePath) async throws -> AbsolutePath?
func makeDirectory(at: Path.AbsolutePath) async throws
func makeDirectory(at: Path.AbsolutePath, options: [MakeDirectoryOptions]) async throws
func makeTemporaryDirectory(prefix: String) async throws -> AbsolutePath
func move(from: Path.AbsolutePath, to: Path.AbsolutePath) async throws
func move(from: AbsolutePath, to: AbsolutePath, options: [MoveOptions]) async throws
func readFile(at path: Path.AbsolutePath) async throws -> Data
func readJSONFile<T>(at path: Path.AbsolutePath) async throws -> T where T : Decodable
func readJSONFile<T>(at path: Path.AbsolutePath, decoder: JSONDecoder) async throws -> T where T : Decodable
func readPlistFile<T>(at path: Path.AbsolutePath) async throws -> T where T : Decodable
func readPlistFile<T>(at path: Path.AbsolutePath, decoder: PropertyListDecoder) async throws -> T where T : Decodable
func readTextFile(at: Path.AbsolutePath) async throws -> String
func readTextFile(at path: Path.AbsolutePath, encoding: String.Encoding) async throws -> String
func remove(_ path: AbsolutePath) async throws
func replace(_ to: AbsolutePath, with path: AbsolutePath) async throws
func resolveSymbolicLink(_ symlinkPath: AbsolutePath) async throws -> AbsolutePath
func runInTemporaryDirectory<T>(prefix: String, _ action: (_ temporaryDirectory: AbsolutePath) async throws -> T) async throws -> T
func touch(_ path: Path.AbsolutePath) async throws
func unzip(_ zipPath: Path.AbsolutePath, to: Path.AbsolutePath) async throws
func writeAsJSON(_ item: some Encodable, at path: AbsolutePath) async throws
func writeAsJSON(_ item: some Encodable, at path: AbsolutePath, encoder: JSONEncoder) async throws
func writeAsJSON(_ item: some Encodable, at path: Path.AbsolutePath, encoder: JSONEncoder, options: Set<WriteJSONOptions>) async throws
func writeAsJSON(_ item: some Encodable, at path: Path.AbsolutePath, options: Set<WriteJSONOptions>) async throws
func writeAsPlist(_ item: some Encodable, at path: AbsolutePath) async throws
func writeAsPlist(_ item: some Encodable, at path: AbsolutePath, encoder: PropertyListEncoder) async throws
func writeAsPlist(_ item: some Encodable, at path: AbsolutePath, encoder: PropertyListEncoder, options: Set<WritePlistOptions>) async throws
func writeAsPlist(_ item: some Encodable, at path: AbsolutePath, options: Set<WritePlistOptions>) async throws
func writeText(_ text: String, at path: AbsolutePath) async throws
func writeText(_ text: String, at path: AbsolutePath, encoding: String.Encoding) async throws
func writeText(_ text: String, at path: AbsolutePath, encoding: String.Encoding, options: Set<WriteTextOptions>) async throws
func zipFileOrDirectoryContent(at path: Path.AbsolutePath, to: Path.AbsolutePath) async throws