Releases: amosavian/FileProvider
Fixes and Additions to WebDAV querying
Bug Fixed: Calling completion handler for upload tasks
Added including (file object properties) argument to WebDAV provider this is the sample code for fetching ETag
and size property of file from WebDAV:
provider.attributesOfItem(path: "/path/to/file", including: [.fileSizeKey, .entryTagKey], completionHandler: { attributes, error in
print(attributes.size)
print(attributes.entryTag)
}
This is also true for contentsOfDirectory()
method
Added FTP support, major improvements and bug fixes
This release adds FTP protocol support with some minor limitations. (see below)
Background sessions can be set now for sessions while not recommended due to serious bugs in Apple CFNetwork implementation when you want download a file with a ranged request.
A new class, FileProviderStreamTask
is introduced which is technically a replica of Apple's URLSessionStreamTask
with iOS 8 support using low level Core Foundation routines.
Here is the list of improvements:
- Credential is open to set/change anytime.
- Deprecating
create(file:)
method which was a duplicate ofwriteContents(path:contents:)
method. Now you can pass nil for data argument to create an empty file.
Here is the list of other bug fixes:
- WebDAV file listing may omit files contains space in name.
- Delegate's progress handler didn't call when uploading/downloading was in progress.
- Swift 3.1 warnings.
FTP provider limitations:
searchFiles()
is not implemented andremoveItem()
won't delete not-empty directories in servers that don't supportSITE RMDIR
extension command. This limitations will be removed whenftpRecursiveList()
is implemented.- Active mode is not implemented, technically saying, I didn't find a workaround to set tcp port manually in
CFNetwork
API - FTP over TLS (FTPS) protocol is not tested while implemented.
Added NSCoding support
Also:
- Better relative path handling in WebDAV.
- Making deprecated methods obsolete.
Bugfixes and Optimizations
Optimized PDF thumbnail/meta handling.
- Fixed
relativePath(of:)
crashing bug. - Fixed ISO speed and GPS Area image meta, better
ExposureTime
calculation. - Fixed Dropbox
name NOT BEGINSWITH %
search query. - Better
LocalFileObject
initialization with empty path. - Refactored
DispatchTime
. - Refactored methods to extensions.
Fixes WebDAV authentication problem, minor lints/optimizations
Fixed #29 Also:
- obsoleted LocalFileProvider.init(directory:domainMask) for LocalFileProvider(for:in:).
- Fixed
BEGINSWITH
typo insearchFiles()
using query strings.
Fixed OneDriveProvider bugs
Now OneDriveProvider
should be working. Some refactors and removing obsoleted functions has been done.
Also:
- fixed and enhanced searching files in Dropbox
Added NSPredicate query to searchFiles() method
searchFiles()
method now moved to FileProviderBasic
, where it belonged. Now there is two version for searchFiles()
, one of them gets String
for query to search within files name, also you can set a NSPredicate
object to query to filter files based on properties like size and modification date, please read inline help for sample predicates.
Also:
- all methods are now
open
to become overridable - Fixed Documentation errors about
urlCache
Documentation completed
-fixed a smal bug when LocalFileProvider
is init with /
Added isReachable method to test connectivity
- Fixed iCloud provider bug when moving/deleting evicted file.
- Fixed iCloud provider paths bugs in returned FileObjects
- Updated documentation
Equatable FileProvider & FileObject, fixed Local provider bug
Fixed a critical bug in LocalFileProvider
which causes copyItem(toLocalURL:)
and copyItem(localURL:)
don't work