Files
GitHawk/Classes/Models/File+Filename.swift
Weyert de Boer 803909e1ff Use actual filename for the file browsing screen (#555)
* Added an extension to the `File` extension so you can get the `potentialLanguage` (based on extension) and the actual name of the file expressed in the class
Updated the `IssuePatchContentViewController.swift` so that it only shoes the file name and not the full path

* Tidying up of the code
2017-10-22 14:03:30 -04:00

18 lines
344 B
Swift

//
// File+Filename.swift
// Freetime
//
// Created by Weyert de Boer on 13/10/2017.
// Copyright © 2017 Ryan Nystrom. All rights reserved.
//
import Foundation
extension File {
/// Returns the actual file name
var actualFileName: String {
return self.filename.components(separatedBy: "/").last ?? self.filename
}
}