Swiftpack.co - erica/Swift-Mac-Utility as Swift Package

Swiftpack.co is a collection of thousands of indexed Swift packages. Search packages.
See all packages published by erica.
erica/Swift-Mac-Utility 0.0.5
Taking the Mac out of the General Utility and putting it in its own package
⭐️ 7
🕓 2 years ago
macOS
.package(url: "https://github.com/erica/Swift-Mac-Utility.git", from: "0.0.5")

Swift Mac Utility

Support code for developing Swift code on Mac.

Extends and depends on Swift-General-Utility.

Contents

Execute

Run a system command with Process and return the contents of stdout or throw stderr for non-zero status. Although you may call this with either a single string or (cmd-path, argument-array), the latter approach is preferred.

Type Utilities

FileManager utility

  • Performs isDir check on path.
  • Creates new empty files.

String utility

  • Perform isDir check on string path.

URL utility

  • Version a URL to ensure a new file won't overwrite existing files.

Installation

PROJECT > Swift Packages > Install:

https://github.com/erica/https://github.com/erica/Swift-Mac-Utility

SwiftPM:

dependencies: [
.package(url: "https://github.com/erica/Swift-Mac-Utility", from: "x.x.x"), // replace with version
],
targets: [
    .target(
        name: "TARGET-NAME",
        dependencies: [
           .product(name: "MacUtility", package: "Swift-Mac-Utility"),
        ],
    ),
],

GitHub

link
Stars: 7
Last commit: 2 years ago
Advertisement: IndiePitcher.com - Cold Email Software for Startups

Swiftpack is being maintained by Petr Pavlik | @ptrpavlik | @swiftpackco | API | Analytics