FileUtils
public struct FileUtils
Wraps utilities for opening and saving files needed by SwiftInfo.
-
The path to the Xcode build log.
Declaration
Swift
public static var buildLogFilePath: String
-
The path to the Xcode test log.
Declaration
Swift
public static var testLogFilePath: String
-
The path to the Buck log.
Declaration
Swift
public static var buckLogFilePath: String
-
A file manager.
Declaration
Swift
public let fileManager: FileManager
-
The utility that opens and saves files.
Declaration
Swift
public let fileOpener: FileOpener
-
Undocumented
Declaration
Swift
public init(fileManager: FileManager = .default, fileOpener: FileOpener = .init())
-
The working path that is containing the SwiftInfo binary.
Declaration
Swift
public var toolFolder: String { get }
-
The path where Infofile.swift is located.
Declaration
Swift
public func infofileFolder() throws -> String
-
The contents of the test log located in the
testLogFilePath
path.Declaration
Swift
public func testLog() throws -> String
-
The contents of the buck log located in the
buckLogFilePath
path.Declaration
Swift
public func buckLog() throws -> String
-
The contents of the build log located in the
buildLogFilePath
path.Declaration
Swift
public func buildLog() throws -> String
-
The folder where the output should be stored.
Declaration
Swift
public func outputFileFolder() throws -> String
-
The desired file path of the output.
Declaration
Swift
public func outputFileURL() throws -> URL
-
Opens the current output JSON in
outputFileURL()
and returns it as a dictionary.Declaration
Swift
public func fullOutput() throws -> [String : Any]
-
Opens the current output JSON in
outputFileURL()
and returns the array of SwiftInfo executions.Declaration
Swift
public func outputArray() throws -> [[String : Any]]
-
Opens the current output JSON in
outputFileURL()
and returns the latest SwiftInfo execution.Declaration
Swift
public func lastOutput() throws -> Output
-
Saves an output dictionary to the
outputFileURL()
.Declaration
Swift
public func save(output: [[String : Any]]) throws