Skip to content

Instantly share code, notes, and snippets.

@laevandus
Created January 31, 2021 02:19
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save laevandus/f780c6bcb47df48a7cb212c9702fc591 to your computer and use it in GitHub Desktop.
Save laevandus/f780c6bcb47df48a7cb212c9702fc591 to your computer and use it in GitHub Desktop.
final class FileReader {
init(fileURL: URL)
/// Opens the I/O channel with random access semantics
func open()
/// Closes the opened I/O channel
func close()
/// Reads data at byte range.
func read(byteRange: CountableRange<Int>, queue: DispatchQueue = .main, completionHandler: @escaping (DispatchData?) -> Void)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment