CoreFoundationKit
provides helpful extensions and rich features build on top of Foundation
framework.
CocoaPods is a dependency manager for Swift and Objective-C Cocoa projects. Learn More!
pod 'CoreFoundationKit', '0.1.0'
The Swift Package Manager is a tool for managing the distribution of Swift code. It’s integrated with the Swift build system to automate the process of downloading, compiling, and linking dependencies. Learn More!
dependencies: [
.package(url: "https://github.com/swiftkits/CoreFoundationKit.git", .upToNextMajor(from: "0.1.0"))
]
A simple, decentralized dependency manager for Cocoa. Learn More!
github "CoreFoundationKit" ~> 0.1.0
FileOperation
let manager = FileManager.default
let rootDir = try! manager.url(for: .documentDirectory, in: .userDomainMask, appropriateFor: nil, create: false)
let directoryOperation = FileDirectoryOperation(manager: manager, rootDir: rootDir)
let fileOperations = FileOperation(directoryManager: directoryOperation)
let savedFile = try fileOperations.save(contentsOf: imageData, with: fileName)
//
// Returns
// FileItem with saved file info
//
savedFile.location // Local storage url of the file
savedFile.name // Name of the file
savedFile.data // data of the file
try fileOperations.deleteFile(at: localFileURL)
try fileOperations.getFile(at: localFileURL)
Following are the useful links for learning about autolayout.
Written By Manish Pandey.
link |
Stars: 0 |
Last commit: 40 weeks ago |
Swiftpack is being maintained by Petr Pavlik | @ptrpavlik | @swiftpackco | API | Analytics