Writable

public protocol Writable

Protocol that defines how an entity can be writed into disk

  • Writes the object that conforms the protocol.

    Throws

    writing error if something goes wrong.

    Declaration

    Swift

    func write(path: AbsolutePath, override: Bool) throws

    Parameters

    path

    The path to write to

    override

    True if the content should be overriden if it already exists.

  • write(pathString:override:) Default implementation

    Writes the object that conforms the protocol.

    Throws

    writing error if something goes wrong.

    Default Implementation

    Declaration

    Swift

    func write(pathString: String, override: Bool) throws

    Parameters

    pathString

    The path string to write to

    override

    True if the content should be overriden if it already exists.