|
@@ -20,8 +20,8 @@ class KMFile: NSObject {
|
|
|
var showPath: String = ""
|
|
|
// var pdfDocument: CPDFDocument?
|
|
|
var systemPDFDocument: PDFDocument?
|
|
|
- var password: String = ""
|
|
|
- var isLocked: Bool = false
|
|
|
+// var password: String = ""
|
|
|
+// var isLocked: Bool = false
|
|
|
var info: KMFileInfo = KMFileInfo()
|
|
|
var attributes: [FileAttributeKey : Any]?
|
|
|
var image: NSImage = NSImage()
|
|
@@ -30,8 +30,8 @@ class KMFile: NSObject {
|
|
|
if filePath.count != 0 {
|
|
|
let attribe = try?FileManager.default.attributesOfItem(atPath: filePath)
|
|
|
if attribe != nil {
|
|
|
- let document = CPDFDocument.init(url: URL(fileURLWithPath: filePath))
|
|
|
- document?.unlock(withPassword: self.password)
|
|
|
+// let document = CPDFDocument.init(url: URL(fileURLWithPath: filePath))
|
|
|
+// document?.unlock(withPassword: self.password)
|
|
|
|
|
|
let dateFormatter: DateFormatter = DateFormatter.init()
|
|
|
let fileDate: Date = attribe![FileAttributeKey(rawValue: "NSFileModificationDate")] as! Date
|
|
@@ -84,7 +84,7 @@ class KMFile: NSObject {
|
|
|
self.image = image
|
|
|
self.info = info
|
|
|
// self.pdfDocument = document
|
|
|
- self.isLocked = ((document?.isLocked) != nil)
|
|
|
+// self.isLocked = ((document?.isLocked) != nil)
|
|
|
self.showPath = string.description
|
|
|
}
|
|
|
}
|