ShellySwift

master

(under construction) File operations for Swift made easier
p-z-l/ShellySwift

ShellySwift

File operations for Swift made easier.

Install:

Swift Package: https://github.com/p-z-l/ShellySwift.git

How to use:

import ShellySwift

// Make sure ShellySwift has been correctly installed
ShellySwift.helloWorld()

// Initialize a URL
let url = URL("~/Documents")

// Know if a URL is file or directory:
if url.isFile {
    print("It's a file")
} else if url.isDirectory {
    // Get the subdirectory URLs of a URL:
    for url in url.subURLs() {
        print(url.lastPathComponent)
    }
}

Description

  • Swift Tools 5.3.0
View More Packages from this Author

Dependencies

  • None
Last updated: Sat Oct 19 2024 21:22:44 GMT-0900 (Hawaii-Aleutian Daylight Time)