Latest 0.1.2
Homepage https://github.com/SetJapanCorporation/LocalFileManager
License MIT
Platforms ios 8.0
Authors

CI Status
Version
License
Platform

LocalFileManager is Wrapped FileManager so that it can be used easily.

TODO

  • [x] Add comment
  • [ ] Genarate Thumbnail image
  • [ ] Throw correct error
  • [ ] Use Optional class correctly
  • [ ] Test

Usage

Howto display all files under the path.

 let fileManager = LocalFileManager()
 let dirPath = try! fileManager.absolutePath(.libraryDirectory)
 let files = try! fileManager.files(at: directoryPath)!
 files.forEach() {
    file in

    let fileName = file.name
    let path = file.path!
    let data = file.data!
 }

Manage file.

 let fileManager = LocalFileManager()

 // Load file.
 let filePath = try! fileManager.absolutePath(.libraryDirectory, path: "/hoge/fuga/img.png")
 let file = try! File(path: filePath)

  // Delete file. 
 try! fileManager.delete(file)

 // Save file.
 try! fileManager.save(file)

 // Delete file. 
 let copyPath = try! fileManager.absolutePath(.libraryDirectory, path: "/hoge/fuga/img.png")
 let copiedFile = try! fileManager.copy(file, to: copyPath)

Requirements

  • iOS 8.0 or later

Installation

LocalFileManager is available through CocoaPods. To install
it, simply add the following line to your Podfile:

pod "LocalFileManager"

Author

asashin227

License

LocalFileManager is available under the MIT license.

Latest podspec

{
    "name": "LocalFileManager",
    "version": "0.1.2",
    "summary": "LocalFileManager is wraped FileManager using easyeary.",
    "description": "TODO: Add long description of the pod here.",
    "homepage": "https://github.com/SetJapanCorporation/LocalFileManager",
    "license": {
        "type": "MIT",
        "file": "LICENSE"
    },
    "authors": {
        "Asakura Shinsuke": "[email protected]"
    },
    "source": {
        "git": "https://github.com/SetJapanCorporation/LocalFileManager.git",
        "tag": "0.1.2"
    },
    "platforms": {
        "ios": "8.0"
    },
    "source_files": "LocalFileManager/Classes/**/*",
    "pushed_with_swift_version": "3.x"
}

Pin It on Pinterest

Share This