Storages

0.0.3

Browse local storages of your applications.
naru-jpn/Storages

What's New

v0.0.3

2022-11-10T08:19:57Z

Adds

  • Preview for plist file.

Storages

Browse local storages of your applications.

Usage Scenes

  • Explore your local storage to reveal configuration of application caches.
  • Find large cache file on your application's storage.
  • Preview image or text and share contents to other devices.
Browse Files Preview File Share File Delete File

Features

  • Easy browsing of files contained local storage.
  • Share files to other device over shared network.
  • Sort files or directory based on applied options.
  • Calculate file size.
  • Calculate total file size contained in any directory.
  • Preview image, binary, text convertable contents.
    • Available file extensions: png, jpg, jpeg, webp, ktx, plist
  • Delete file with swipe.

Installation

Support install using Swift Package Manager.

Usage

Browsing from Home direcotry.

Simply you only need to create StorageBrowser with parameter source.

// Create new browser (SwiftUI view).
StorageBrowser(source: .home)

Browsing from custom path.

name is only used as navigation title.

StorageBrowser(source: .custom(path: CUSTOM_PATH, name: CUSTOM_NAME))

Configure storategy of sorting.

setting contains rules of sorting and option for previewing contents.

struct Settings {
  let sortingStrategy: SortingStrategy?
  let previewSettings: FilePreview.Settings
}
// ...
StorageBrowser(source: source, setting: setting)

SortingStrategy is defined here.

  • Display directory first or not.
  • Rule to sort files.
    • alphabet
    • fileSize

Configure settings of previewing contents.

Now you can only set option to preview string contents.

Too long text takes too much time to render when using Text of SwiftUI. So default value of maxStringPreviewLength is 1000.

struct Settings {
  let stringEncoding: String.Encoding
  let maxStringPreviewLength: Int
}

Licenses

All source code is licensed under the MIT License.

Description

  • Swift Tools 5.7.0
View More Packages from this Author

Dependencies

  • None
Last updated: Wed Nov 16 2022 09:18:13 GMT-0500 (GMT-05:00)