Skip to content

Instantly share code, notes, and snippets.

View stucarney's full-sized avatar

Stu Carney stucarney

View GitHub Profile
@stucarney
stucarney / Storage.swift
Last active July 13, 2018 21:40 — forked from saoudrizwan/Storage.swift
[LINUX SUPPORTED] Helper class to easily store and retrieve Codable structs from/to disk. https://medium.com/@sdrzn/swift-4-codable-lets-make-things-even-easier-c793b6cf29e1
import Foundation
public class Storage {
fileprivate init() { }
/// Get the current working directory
/// - Returns: URL of current working directory
static func getCurrentDirectoryURL() -> URL {
return URL(fileURLWithPath: FileManager.default.currentDirectoryPath, isDirectory: true)