mirror of
https://github.com/zhigang1992/GitHawk.git
synced 2026-03-30 23:20:27 +08:00
* 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
18 lines
344 B
Swift
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
|
|
}
|
|
}
|