mirror of
https://github.com/zhigang1992/GitHawk.git
synced 2026-03-30 09:04:02 +08:00
34 lines
659 B
Swift
34 lines
659 B
Swift
//
|
|
// RepositoryFile.swift
|
|
// Freetime
|
|
//
|
|
// Created by Ryan Nystrom on 10/8/17.
|
|
// Copyright © 2017 Ryan Nystrom. All rights reserved.
|
|
//
|
|
|
|
import Foundation
|
|
import IGListKit
|
|
|
|
final class RepositoryFile: ListDiffable {
|
|
|
|
let name: String
|
|
let isDirectory: Bool
|
|
|
|
init(name: String, isDirectory: Bool) {
|
|
self.name = name
|
|
self.isDirectory = isDirectory
|
|
}
|
|
|
|
// MARK: ListDiffable
|
|
|
|
func diffIdentifier() -> NSObjectProtocol {
|
|
return name as NSObjectProtocol
|
|
}
|
|
|
|
func isEqual(toDiffableObject object: ListDiffable?) -> Bool {
|
|
// assume cannot change between blob and dir
|
|
return true
|
|
}
|
|
|
|
}
|