URL

extension URL
  • Convenience function for Data(contentsOf: URL)

    Throws

    An error in the Cocoa domain, if url cannot be read.

    Declaration

    Swift

    public func readFileContents() throws -> Data

    Return Value

    Data with contents of the (local) File