123456789101112131415161718192021222324252627282930 |
- //
- // KMMergeViewModel.swift
- // PDF Reader Pro
- //
- // Created by User-Tangchao on 2024/9/30.
- //
- import Cocoa
- class KMMergeViewModel: NSObject {
- var fileUrl: URL?
- var oriFileUrl: URL?
- var isImage = false
-
- func fetchFileName() -> String? {
- if isImage {
- return self.oriFileUrl?.deletingPathExtension().lastPathComponent
- } else {
- return self.fileUrl?.deletingPathExtension().lastPathComponent
- }
- }
-
- func fetchFileExn() -> String? {
- if isImage {
- return self.oriFileUrl?.pathExtension
- } else {
- return self.fileUrl?.pathExtension
- }
- }
- }
|