dmytro-anokhin / url-image

AsyncImage before iOS 15. Lightweight, pure SwiftUI Image view, that displays an image downloaded from URL, with auxiliary views and local cache.
MIT License
1.1k stars 96 forks source link

URLImageFileStore.init(fileIndex:) now public #166

Open sergey-ilyin opened 2 years ago

sergey-ilyin commented 2 years ago

This patch allows to customize path to file storage:

       ```
         let fileIndexConfiguration = FileIndex.Configuration(
              name: "URLImage",
              filesDirectoryName: "images",
              directoryURL: /* OUR PATH */
        )
        let fileIndex = FileIndex( configuration: fileIndexConfiguration )

        let urlImageService = URLImageService(
              fileStore: URLImageFileStore( fileIndex: fileIndex ), // <-- this now public, otherwise will not compile
              inMemoryStore: URLImageInMemoryStore()
        )