Skip to content

Instantly share code, notes, and snippets.

View tylerarnold's full-sized avatar

Tyler tylerarnold

View GitHub Profile
@tylerarnold
tylerarnold / NRFileManager.swift
Last active April 25, 2017 20:10
A method to calculate the accumulated size of a directory on the volume in bytes.
//
// Created by Nikolai Ruhe on 2016-02-10.
// Copyright (c) 2016 Nikolai Ruhe. All rights reserved.
// updated for Swift 3, Tyler Arnold 2017-04-25
//
import Foundation
extension FileManager {
func allocatedSizeOfDirectoryAtURL(directoryURL: URL) throws -> UInt64 {