-
Notifications
You must be signed in to change notification settings - Fork 8
MimeDetector
Abhinav Dhiman edited this page Sep 11, 2020
·
1 revision
public struct MimeDetectorpublic init(data: Data)public init(bytes: [UInt8])A static method to get the MimeType that matches the given file data
static public func mimeType(data: Data) -> MimeType?Optional
A static method to get the MimeType that matches the given bytes
static public func mimeType(bytes: [UInt8]) -> MimeType?Optional
Get the MimeType that matches the given MimeDetector instance
static public func mimeType(mimeDetector: MimeDetector) -> MimeType?Optional
Read bytes from file data
public func readBytes(count: Int) -> [UInt8]- count: - count: Number of bytes to be read
Bytes represented with [UInt8]