Coder Social home page Coder Social logo

filebrowser's Introduction

FileBrowser - iOS Finder-style file browser in Swift

Build Status Version Carthage compatible

FileBrowser

iOS Finder-style file browser in Swift with search, file previews and 3D touch. Simple and quick to use.

Features

          |  Features

--------------------------|------------------------------------------------------------ ๐Ÿ“ฑ | Browse files and folders with a familiar UI on iOS. ๐Ÿ” | Pull down to search. ๐Ÿ‘“ | Preview most file types. Including plist and json. ๐Ÿ‘† | 3D touch support for faster previews with Peek & Pop. ๐Ÿ’ฎ | Fully customizable.

Usage

Import FileBrowser at the top of the Swift file.

import FileBrowser

To show the file browser, all you need to do is:

let fileBrowser = FileBrowser()
self.presentViewController(fileBrowser, animated: true, completion: nil)

By default, the file browser will open in your app's documents directory. When users select a file, a preview will be displayed - offering an action sheet of options based on the file type.

Advanced Usage

You can open FileBrowser in a different root folder by initialising with an NSURL file path of your choice.

let fileBrowser = FileBrowser(initialPath: customPath)

Use the didSelectFile closure to change FileBrowser's behaviour when a file is selected.

fileBrowser.didSelectFile = { (file: FBFile) -> Void in
    print(file.displayName)
}

To exclude a certain file type or a specific file path:

fileBrowser.excludesFileExtensions = ["zip"]
fileBrowser.excludesFilepaths = [secretFile]

Setting up with CocoaPods

source 'https://github.com/CocoaPods/Specs.git'
pod 'FileBrowser', '~> 0.1'

Setting up with Carthage

Carthage is a decentralized dependency manager that automates the process of adding frameworks to your Cocoa application.

You can install Carthage with Homebrew using the following command:

$ brew update
$ brew install carthage

To integrate FileBrowser into your Xcode project using Carthage, specify it in your Cartfile:

github "marmelroy/FileBrowser"

filebrowser's People

Contributors

delba avatar marmelroy avatar waterskier2007 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.