This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Forked from https://gist.github.com/mminer/d0a043b0b6054f428a8ed1f505bfe1b0 to | |
import Foundation | |
public extension Double { | |
var stringFileSize: String { | |
guard self > 0 else { | |
return "0 bytes" | |
} | |
guard self != 1 else { | |
return "1 byte" |