Skip to content

Latest commit

 

History

History
15 lines (13 loc) · 388 Bytes

README.md

File metadata and controls

15 lines (13 loc) · 388 Bytes

URLWatcher

URL extension to watch its contents using Swift AsyncStream

Installation

Add URLWatcher.swift to your project

Usage

if let documentsContents = FileManager.default.urls(for: .documentDirectory,
                                                    in: .userDomainMask).first?.contents {
  for await contents in documentsContents {
    print(contents)
  }
}