-
Writes the file at the specified location
Declaration
Swift
public func perform(in context: OperationContext) throws -
The desired name of the file, including an extension. Any path elements will be considered relative a location known by the consumer of the TextFile
Declaration
Swift
public var name: String -
Undocumented
Declaration
Swift
public private(set) var content: String -
Creates a new instance
Declaration
Swift
public init(_ name: String)Parameters
nameThe name of the textfile
-
Appends the supplied items to the text file at the current tab depth
Declaration
Swift
@discardableResult public func print(terminator:String = "\n", separator:String = "\n", prefix : String = "", _ items:String...)->TextFileParameters
terminatorAn optional terminator to use. By default it is \n
separatorAn optional separator to use between items/ Defaults to a newline
prefixAn optional prefex to add to each supplied item
itemsOne or more Strings to be appended to the file
Return Value
Itself for chaining
-
Indents subsequent output
Declaration
Swift
@discardableResult public func indent() -> TextFileReturn Value
Itself for chaining
-
Outdents subsequent output
Declaration
Swift
@discardableResult public func outdent() -> TextFileReturn Value
Itself for chaining
TextFile Class Reference