FileManager replacement for Local, iCloud and Remote (WebDAV/FTP/Dropbox/OneDrive) files -- Swift
Swift 5 support
Changes in version 0.25.0:
General
FileProviderReadWriteProgressive
to allow FTP and HTTP-based providers to fetch file content progressively, suitable for streaming.FileObject
equality and hashing methodsLocal
LocalFileMonitor
class public to monitor folder/file changes directly without using provider's registerNotification
iCloud
FTP
General
FileProviderReadWriteProgressive
to allow FTP and HTTP-based providers to fetch file content progressively, suitable for streaming.FileObject
equality and hashing methodsLocal
LocalFileMonitor
class public to monitor folder/file changes directly without using provider's registerNotification
iCloud
FTP
General
FTP
OneDrive
General
isReachable()
returns error
encountered in addition to success
.OneDrive
iCloud
WebDAV
searchFiles()
"including" param was being ignored.General
deinit
.WebDAV
FTP
NSURLSessionStreamTask
.Dropbox
attributesOfItem()
returned error instead of result.This is the last pod which will work with Swift 3. If you are using Swift 3 in your project, please use swift-3
(will be created soon) branch directly using other installation methods. I will maintain code for Swift 3 as far as possible.
OneDrive provider is updated to latest version according to Microsoft documentations. You can use OneDriveProvider.Route
enum to determine which root should be used to access files, use .me
to access your own files or other options to access enterprise and shared files.
-Important: storageProperties()
method signature has been changed and you have to rectify it manually.
contents(path:, progressHandler:)
method added to allow fetch data of remote file progressively. This allows buffering and showing files while downloading.
Other improvements:
storageProperties()
method now returns VolumeObject
instance in completion handler, which contains volume size and other informations.contents(path:, progressHandler:)
for HTTP-based providerscurrentPath
property.copy(path:toLocalURL)
and copy(localURL:to:)
reading and writing to local url are coordinated now.Bugs fixed:
Transfer-Encoding: chunked
.url(of:)
crash when path is empty.Progress
returned didn't parented correctly.currentPath
property is now deprecated and out of use. It will be marked as obsoleted soon. Use local var in case you want to track it. Also fileproviderFailed()
delegate method signature has changed to send Error
object to user.
Changes:
contents(of:)
methods, with .fetch
case.URL.checkResourceIsReachable()
to check file exists instead if FileManager.fileExists()
for iCloud and promised urls.URLRequest
headers for Content-Type
, Accept-Encoding
, Range
, etc.Bugs fixed:
Dropbox, WebDAV & OneDrive all are refactored to HTTPFileProvider
base class, decreases bugs and adds more consistency.
Because FileOperationType.source
is not optional anymore, I had to increase version.
Also:
Important: Deprecating OperationHandle
class in favor of Foundation's Progress
class is a source breaking change. You may have to update your current code to use new feature.
Other improvements: