A type that can be assigned either a String or haxe.io.Bytes.

The save function can be used to save the content in its appropriate format to a file.

Static methods

@:fromstaticfromBytes(b:Bytes):StringOrBytes

@:fromstaticfromString(s:String):StringOrBytes

staticisBytes(this:StringOrBytesImpl):Bool

staticisString(this:StringOrBytesImpl):Bool

staticmatchesFile(this:StringOrBytesImpl, path:String):Bool

Checks if the stored content matches the file's content at path.

staticsave(this:StringOrBytesImpl, path:String):Void

Saves the content using sys.io.File.saveContent or sys.io.File.saveBytes depending on whether storing a String or haxe.io.Bytes.