All Projects → cornerAnt → Digger

cornerAnt / Digger

Licence: mit
Digger is a lightweight download framework that requires only one line of code to complete the file download task

Programming Languages

swift
15916 projects

Projects that are alternatives of or similar to Digger

Github Files Fetcher
Download a specific folder or file from a GitHub repo through command line
Stars: ✭ 73 (-85.99%)
Mutual labels:  download, file
Youtubedownloader
Downloads videos and playlists from YouTube
Stars: ✭ 2,202 (+322.65%)
Mutual labels:  mp4, download
File
Select files. Download files. Work with file content.
Stars: ✭ 96 (-81.57%)
Mutual labels:  download, file
Downloader
Powerful and flexible Android file downloader
Stars: ✭ 193 (-62.96%)
Mutual labels:  download, file
anikimiapi
A Simple, LightWeight, Statically-Typed Python3 API wrapper for GogoAnime.
Stars: ✭ 15 (-97.12%)
Mutual labels:  url, download
Nodestream
Storage-agnostic streaming library for binary data transfers
Stars: ✭ 70 (-86.56%)
Mutual labels:  download, file
Youtubedownloader
Android App for searching for videos on Youtube by keywords using YouTube Data API and download videos from YouTube in different formats.
Stars: ✭ 25 (-95.2%)
Mutual labels:  mp4, download
Downgit
Create GitHub Resource Download Link
Stars: ✭ 936 (+79.65%)
Mutual labels:  download, file
http
Aplus Framework HTTP Library
Stars: ✭ 113 (-78.31%)
Mutual labels:  url, download
video thumbnail
This plugin generates thumbnail from video file or URL. It returns image in memory or writes into a file. It offers rich options to control the image format, resolution and quality. Supports iOS and Android.
Stars: ✭ 159 (-69.48%)
Mutual labels:  url, file
Isobmff
C++ Library for ISO/IEC 14496-12 - ISO Base Media File Format (QuickTime, MPEG-4, HEIF, etc)
Stars: ✭ 157 (-69.87%)
Mutual labels:  mp4, file
github-content
Easily download files from github raw user content.
Stars: ✭ 21 (-95.97%)
Mutual labels:  download, file
Pantheon
The fastest YouTube downloader.
Stars: ✭ 32 (-93.86%)
Mutual labels:  mp4, download
Pluradl.py
Automated download of Pluralsight courses
Stars: ✭ 406 (-22.07%)
Mutual labels:  mp4, download
Limax
Node.js module to generate URL slugs. Another one? This one cares about i18n and transliterates non-Latin scripts to conform to the RFC3986 standard. Mostly API-compatible with similar modules.
Stars: ✭ 423 (-18.81%)
Mutual labels:  url
Aria
下载可以很简单
Stars: ✭ 4,777 (+816.89%)
Mutual labels:  file
Easyhttp
Android 网络请求框架,简单易用,so easy
Stars: ✭ 423 (-18.81%)
Mutual labels:  download
React Native Fs
Native filesystem access for react-native
Stars: ✭ 4,264 (+718.43%)
Mutual labels:  download
Mediatoolkit
A .NET library to convert and process all your video & audio files.
Stars: ✭ 492 (-5.57%)
Mutual labels:  mp4
Music Metadata
Stream and file based music metadata parser for node. Supporting a wide range of audio and tag formats.
Stars: ✭ 455 (-12.67%)
Mutual labels:  mp4

Version Carthage compatible Version

中文说明

Digger is a lightweight download framework that requires only one line of code to complete the file download task.

Based on URLSession, pure Swift language implementation, support chain syntax call, real-time download progress, real-time download speed, breakpoint download.

The user forces the app to be shut down, for example by sliding off the app. Digger can still resume downloading tasks.

Features:

  • Large file download
  • Multi thread Download
  • Thread safety
  • Breakpoint downloading
  • Controllable concurrency

Requirements"

  • iOS 8.0+
  • Xcode 9.0+
  • Swift 4.0+

Installation

CocoaPods

Add to your Podfile:

pod 'Digger'

Carthage

Add to your Cartfile:

github "cornerAnt/Digger"

Usage

###Basic: Download a file in the Digger directory under the sandbox's Caches

   let url = "http://example.com/digger.mp4"
   Digger.download(url)

Choose different callbacks depending on your needs

        
  Digger.download(url)
        .progress(nil)
        .speed(nil)
        .completion(nil)
   let url = "http://example.com/digger.mp4"

        Digger.download(url)
            .progress({ (progresss) in
                print(progresss.fractionCompleted)

            })
            .speed({ (speed) in
                print(speed)
            })
            .completion { (result) in
                
                switch result {
                case .success(let url):
                    print(url)
                    
                case .failure(let error):
                    print(error)
                    
                }
                
        }
}

Config yourself

/// Start the task at once,default is true

DiggerManager.shared.startDownloadImmediately = false

/// maxConcurrentTasksCount,deault is 3

DiggerManager.shared.maxConcurrentTasksCount = 4

///  request timeout,deault is 100 

DiggerManager.shared.timeout = 150

/// allowsCellularAccess,deault is true

DiggerManager.shared.allowsCellularAccess = false

/// loglevel,deault is high
/*
***************DiggerLog****************
file   : ExampleController.swift
method : viewDidLoad()
line   : [31]:
info   : digger log

*/
// If you want to close,set the level to be .none

DiggerManager.shared.logLevel = .none




// MARK:-  DiggerCache

/// In the sandbox cactes directory, custom your cache directory

DiggerCache.cachesDirectory = "Directory"

/// Delete all downloaded files

DiggerCache.cleanDownloadFiles()

/// Delete all temporary download files

DiggerCache.cleanDownloadTempFiles()

/// Get the system's available memory size

_ = DiggerCache.systemFreeSize()

/// Get the size of the downloaded file

_ = DiggerCache.downloadedFilesSize()

/// Get the path to all downloaded files
_ = DiggerCache.pathsOfDownloadedfiles
}

Contributing

  1. Fork
  2. Commit changes to a branch in your fork
  3. Push your code and make a pull request

License

Digger is Copyright (c) 2017 cornerAnt and released as open source under the attached MIT License.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].