Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/kishikawakatsumi/swift-magic
A Swift wrapper for libmagic
https://github.com/kishikawakatsumi/swift-magic
Last synced: about 1 month ago
JSON representation
A Swift wrapper for libmagic
- Host: GitHub
- URL: https://github.com/kishikawakatsumi/swift-magic
- Owner: kishikawakatsumi
- License: other
- Created: 2018-12-22T16:24:05.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2018-12-24T04:21:01.000Z (over 5 years ago)
- Last Synced: 2024-07-22T17:36:03.671Z (2 months ago)
- Language: Swift
- Size: 1.33 MB
- Stars: 33
- Watchers: 3
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
[![Build Status](https://app.bitrise.io/app/b4717764acae567c/status.svg?token=X3pkDXIRd3cRfUST2aHDyA)](https://app.bitrise.io/app/b4717764acae567c) [![CocoaPods](https://img.shields.io/cocoapods/v/swift-magic.svg?style=flat)](https://cocoapods.org/pods/swift-magic) [![Carthage](https://img.shields.io/badge/Carthage-compatible-brightgreen.svg?style=flat)](https://github.com/Carthage/Carthage)
# swift-magic
A Swift wrapper for libmagicswift-magic is a Swift interface to the libmagic file type
identification library. libmagic identifies file types by checking
their headers according to a predefined list of file types. This
functionality is exposed to the command line by the Unix command
`file`.## Usage
```swift
import Magiclet description = try Magic.shared.file(path)
```## Requirements
swift-magic is written in Swift 4.2. Compatible with iOS 8.0+## Installation
### CocoaPods
swift-magic is available through [CocoaPods](https://cocoapods.org). To install
it, simply add the following line to your Podfile:```ruby
pod 'swift-magic'
```### Carthage
For [Carthage](https://github.com/Carthage/Carthage), add the following to your `Cartfile`:```ogdl
github "kishikawakatsumi/swift-magic"
```## Author
Kishikawa Katsumi, [email protected]## License
swift-magic is available under the BSD license. See the LICENSE file for more info.