mirror of
https://github.com/qvacua/vimr.git
synced 2024-11-28 19:47:41 +03:00
36 lines
797 B
Swift
36 lines
797 B
Swift
|
/**
|
||
|
* Tae Won Ha - http://taewon.de - @hataewon
|
||
|
* See LICENSE
|
||
|
*/
|
||
|
|
||
|
import Foundation
|
||
|
|
||
|
class FileItem : CustomStringConvertible {
|
||
|
|
||
|
let url: NSURL
|
||
|
let dir: Bool
|
||
|
let hidden: Bool
|
||
|
|
||
|
/// When nil, then it has never been fnmatch'ed.
|
||
|
weak var ignoreToken: Token?
|
||
|
var ignore = false
|
||
|
|
||
|
var needsScanChildren = false
|
||
|
var childrenScanned = false
|
||
|
|
||
|
var children: [FileItem] = []
|
||
|
|
||
|
var description: String {
|
||
|
return "<FileItem: \(self.url), dir=\(self.dir), hidden=\(self.hidden), "
|
||
|
+ "needsScan=\(self.needsScanChildren), childrenScanned=\(self.childrenScanned), "
|
||
|
+ "ignore=\(self.ignore), ignoreToken=\(self.ignoreToken), "
|
||
|
+ "children=\(self.children.count)>"
|
||
|
}
|
||
|
|
||
|
init(_ url: NSURL) {
|
||
|
self.url = url
|
||
|
self.dir = url.dir
|
||
|
self.hidden = url.hidden
|
||
|
}
|
||
|
}
|