123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826 |
- //
- // NCManageDatabase.swift
- // Nextcloud
- //
- // Created by Marino Faggiana on 06/05/17.
- // Copyright © 2017 TWS. All rights reserved.
- //
- import RealmSwift
- class NCManageDatabase: NSObject {
-
- static let sharedInstance: NCManageDatabase = {
- let instance = NCManageDatabase()
- return instance
- }()
-
- override init() {
-
- let dirGroup = FileManager.default.containerURL(forSecurityApplicationGroupIdentifier: NCBrandOptions.sharedInstance.capabilitiesGroups)
- var config = Realm.Configuration()
-
- config.fileURL = dirGroup?.appendingPathComponent("\(appDatabaseNextcloud)/\(k_databaseDefault)")
-
- Realm.Configuration.defaultConfiguration = config
- }
-
- //MARK: -
- //MARK: Utility Database
- func clearTable(_ table : Object.Type, account: String?) {
-
- let results : Results<Object>
- let realm = try! Realm()
-
- if (account != nil) {
-
- results = realm.objects(table).filter("account = %@", account!)
- } else {
-
- results = realm.objects(table)
- }
-
- try! realm.write {
- realm.delete(results)
- }
- }
-
- func removeDB() {
-
- let realmURL = Realm.Configuration.defaultConfiguration.fileURL!
- let realmURLs = [
- realmURL,
- realmURL.appendingPathExtension("lock"),
- realmURL.appendingPathExtension("note"),
- realmURL.appendingPathExtension("management")
- ]
- for URL in realmURLs {
- do {
- try FileManager.default.removeItem(at: URL)
- } catch {
- // handle error
- }
- }
- }
-
- //MARK: -
- //MARK: Table Account
-
- func addAccount(_ account: String, url: String, user: String, password: String) {
- let realm = try! Realm()
-
- try! realm.write {
-
- let addAccount = tableAccount()
-
- addAccount.account = account
-
- // Brand
- if NCBrandOptions.sharedInstance.use_default_automatic_upload {
-
- addAccount.cameraUpload = true
- addAccount.cameraUploadPhoto = true
- addAccount.cameraUploadVideo = true
- addAccount.cameraUploadWWAnVideo = true
- }
-
- addAccount.password = password
- addAccount.url = url
- addAccount.user = user
- }
- }
-
- func updateAccount(_ account: String, password: String) {
-
- let realm = try! Realm()
-
- let results = realm.objects(tableAccount.self).filter("account = %@", account)
- if (results.count > 0) {
-
- try! realm.write {
- results[0].password = password
- }
- }
- }
-
- func deleteAccount(_ account: String) {
-
- let realm = try! Realm()
-
- let results = realm.objects(tableAccount.self).filter("account = %@", account)
- if (results.count > 0) {
-
- try! realm.write {
- realm.delete(results)
- }
- }
- }
- func setAccountActive(_ account: String) -> tableAccount {
-
- let realm = try! Realm()
- var activeAccount = tableAccount()
-
- let results = realm.objects(tableAccount.self)
-
- try! realm.write {
-
- for result in results {
-
- if result.account == account {
-
- result.active = true
- activeAccount = result
-
- } else {
-
- result.active = false
- }
- }
- }
-
- return activeAccount
- }
-
- func getAccountActive() -> tableAccount? {
-
- let realm = try! Realm()
-
- let results = realm.objects(tableAccount.self).filter("active = true")
- if (results.count > 0) {
- return results[0]
- } else {
- return nil
- }
- }
- func getAccounts(_ account: String?) -> [tableAccount] {
-
- let realm = try! Realm()
- let results : Results<tableAccount>
-
- if account == nil {
-
- results = realm.objects(tableAccount.self).sorted(byKeyPath: "account", ascending: true)
-
- } else {
-
- results = realm.objects(tableAccount.self).filter("account = %@", account!).sorted(byKeyPath: "account", ascending: true)
- }
-
- return Array(results)
- }
-
- // getCameraUploadFolderNameActiveAccount + getCameraUploadFolderPathActiveAccount
- func getCameraUploadFolderName(_ account: String, activeUrl : String?) -> String {
-
- let realm = try! Realm()
-
- let results = realm.objects(tableAccount.self).filter("account = %@", account)
- if (results.count > 0) {
-
- if results[0].cameraUploadFolderName.characters.count > 0 {
-
- if activeUrl == nil {
-
- return results[0].cameraUploadFolderName
-
- } else {
-
- return results[0].cameraUploadFolderPath
- }
-
- } else {
-
- if activeUrl == nil {
-
- return k_folderDefaultCameraUpload
-
- } else {
-
- return CCUtility.getHomeServerUrlActiveUrl(activeUrl!)
- }
- }
- }
-
- return ""
- }
- // getCameraUploadFolderNamePathActiveAccount
- func getCameraUploadFolderNamePath(_ account: String, activeUrl : String) -> String {
-
- let cameraFolderName = self.getCameraUploadFolderName(account, activeUrl: nil)
- let cameraFolderPath = self.getCameraUploadFolderName(account, activeUrl: activeUrl)
-
- let folderPhotos = CCUtility.stringAppendServerUrl(cameraFolderPath, addFileName: cameraFolderName)!
-
- return folderPhotos
- }
-
-
- //MARK: -
- //MARK: Table Activity
- func addActivityServer(_ listOfActivity: [OCActivity], account: String) {
-
- let realm = try! Realm()
-
- try! realm.write {
-
- for activity in listOfActivity {
-
- // Verify
- let results = realm.objects(tableActivity.self).filter("idActivity = %d", activity.idActivity)
- if (results.count > 0) {
- continue
- }
-
- // Add new Activity
- let addActivity = tableActivity()
-
- addActivity.account = account
-
- if activity.date != nil {
- addActivity.date = activity.date! as NSDate
- }
-
- addActivity.idActivity = Double(activity.idActivity)
- addActivity.link = activity.link
- addActivity.note = activity.subject
- addActivity.type = k_activityTypeInfo
- realm.add(addActivity)
- }
- }
- }
-
- func addActivityClient(_ file: String, fileID: String, action: String, selector: String, note: String, type: String, verbose: Bool, account: String?, activeUrl: String?) {
- var noteReplacing : String = ""
-
- if (activeUrl != nil) {
- noteReplacing = note.replacingOccurrences(of: "\(activeUrl!)\(webDAV)", with: "")
- }
- noteReplacing = note.replacingOccurrences(of: "\(k_domain_session_queue).", with: "")
- let realm = try! Realm()
-
- try! realm.write {
- // Add new Activity
- let addActivity = tableActivity()
- if (account != nil) {
- addActivity.account = account!
- }
-
- addActivity.action = action
- addActivity.file = file
- addActivity.fileID = fileID
- addActivity.note = noteReplacing
- addActivity.selector = selector
- addActivity.type = type
- addActivity.verbose = verbose
- realm.add(addActivity)
- }
- }
-
- func getActivityWithPredicate(_ predicate: NSPredicate) -> [tableActivity] {
-
- let realm = try! Realm()
- let results = realm.objects(tableActivity.self).filter(predicate).sorted(byKeyPath: "date", ascending: false)
-
- return Array(results)
- }
-
- //MARK: -
- //MARK: Table Automatic Upload
-
- func addAutomaticUpload(_ metadataNet: CCMetadataNet, account: String) -> Bool {
-
- let realm = try! Realm()
-
- // Verify if exists
- let results = realm.objects(tableAutomaticUpload.self).filter("account = %@ AND assetLocalIdentifier = %@", account, metadataNet.assetLocalIdentifier)
- if (results.count > 0) {
- return false
- }
-
- try! realm.write {
-
- // Add new AutomaticUpload
- let addAutomaticUpload = tableAutomaticUpload()
-
- addAutomaticUpload.account = account
- addAutomaticUpload.assetLocalIdentifier = metadataNet.assetLocalIdentifier
- addAutomaticUpload.fileName = metadataNet.fileName
- addAutomaticUpload.selector = metadataNet.selector
- if (metadataNet.selectorPost != nil) {
- addAutomaticUpload.selectorPost = metadataNet.selectorPost
- }
- addAutomaticUpload.serverUrl = metadataNet.serverUrl
- addAutomaticUpload.session = metadataNet.session
- addAutomaticUpload.priority = metadataNet.priority
-
- realm.add(addAutomaticUpload)
- }
- return true
- }
-
- func getAutomaticUploadForAccount(_ account: String, selector: String) -> CCMetadataNet? {
-
- let realm = try! Realm()
-
- // Verify if exists
- let results = realm.objects(tableAutomaticUpload.self).filter("account = %@ AND selector = %@ AND lock == false", account, selector)
- if (results.count == 0) {
- return nil
- }
- let metadataNet = CCMetadataNet()
-
- metadataNet.action = actionUploadAsset
- metadataNet.assetLocalIdentifier = results[0].assetLocalIdentifier
- metadataNet.fileName = results[0].fileName
- metadataNet.priority = results[0].priority
- metadataNet.selector = results[0].selector
- metadataNet.selectorPost = results[0].selectorPost
- metadataNet.serverUrl = results[0].serverUrl
- metadataNet.session = results[0].session
- metadataNet.taskStatus = Int(k_taskStatusResume)
-
- // Lock True
- try! realm.write {
- results[0].lock = true
- }
-
- return metadataNet
- }
-
- func getLockAutomaticUploadForAccount(_ account: String) -> [tableAutomaticUpload] {
-
- let realm = try! Realm()
-
- let results = realm.objects(tableAutomaticUpload.self).filter("account = %@ AND lock = true", account)
-
- return Array(results)
- }
- func unlockAutomaticUploadForAccount(_ account: String, assetLocalIdentifier: String) {
-
- let realm = try! Realm()
-
- let results = realm.objects(tableAutomaticUpload.self).filter("account = %@ AND assetLocalIdentifier = %@", account, assetLocalIdentifier)
- if (results.count > 0) {
-
- // Lock False
- try! realm.write {
- results[0].lock = false
- }
- }
- }
-
- func deleteAutomaticUploadForAccount(_ account: String, assetLocalIdentifier: String) {
-
- let realm = try! Realm()
-
- let results = realm.objects(tableAutomaticUpload.self).filter("account = %@ AND assetLocalIdentifier = %@", account, assetLocalIdentifier)
- if (results.count > 0) {
-
- try! realm.write {
- realm.delete(results)
- }
- }
- }
-
- func countAutomaticUploadForAccount(_ account: String, selector: String?) -> Int {
-
- let realm = try! Realm()
- let results : Results<tableAutomaticUpload>
-
- if (selector == nil) {
-
- results = realm.objects(tableAutomaticUpload.self).filter("account = %@", account)
-
- } else {
-
- results = realm.objects(tableAutomaticUpload.self).filter("account = %@ AND selector = %@", account, selector!)
- }
-
- return results.count
- }
-
- //MARK: -
- //MARK: Table Capabilities
-
- func addCapabilities(_ capabilities: OCCapabilities, account: String) {
-
- let realm = try! Realm()
-
- let results = realm.objects(tableCapabilities.self).filter("account = %@", account)
-
- try! realm.write {
-
- var resultCapabilities = tableCapabilities()
-
- if (results.count > 0) {
- resultCapabilities = results[0]
- }
-
- resultCapabilities.account = account
- resultCapabilities.themingBackground = capabilities.themingBackground
- resultCapabilities.themingColor = capabilities.themingColor
- resultCapabilities.themingLogo = capabilities.themingLogo
- resultCapabilities.themingName = capabilities.themingName
- resultCapabilities.themingSlogan = capabilities.themingSlogan
- resultCapabilities.themingUrl = capabilities.themingUrl
- resultCapabilities.versionMajor = capabilities.versionMajor
- resultCapabilities.versionMinor = capabilities.versionMinor
- resultCapabilities.versionMicro = capabilities.versionMicro
- resultCapabilities.versionString = capabilities.versionString
-
- if (results.count == 0) {
- realm.add(resultCapabilities)
- }
- }
- }
-
- func getCapabilitesForAccount(_ account: String) -> tableCapabilities? {
-
- let realm = try! Realm()
-
- let results = realm.objects(tableCapabilities.self).filter("account = %@", account)
-
- if (results.count > 0) {
- return results[0]
- } else {
- return nil
- }
- }
-
- func getServerVersionAccount(_ account: String) -> Int {
- let realm = try! Realm()
- let results = realm.objects(tableCapabilities.self).filter("account = %@", account)
- if (results.count > 0) {
- return results[0].versionMajor
- } else {
- return 0
- }
- }
- //MARK: -
- //MARK: Table Certificates
-
- func addCertificates(_ certificateLocation: String) {
-
- let realm = try! Realm()
-
- try! realm.write {
-
- let addCertificates = tableCertificates()
-
- addCertificates.certificateLocation = certificateLocation
-
- realm.add(addCertificates)
- }
- }
-
- func getCertificatesLocation(_ localCertificatesFolder: String) -> [String] {
-
- let realm = try! Realm()
-
- let results = realm.objects(tableCertificates.self)
-
- var arraycertificatePath = [String]()
-
- for result in results {
- arraycertificatePath.append("\(localCertificatesFolder)\(result.certificateLocation)")
- }
-
- return arraycertificatePath
- }
- //MARK: -
- //MARK: Table External Sites
-
- func addExternalSites(_ externalSites: OCExternalSites, account: String) {
-
- let realm = try! Realm()
-
- try! realm.write {
-
- let addExternalSite = tableExternalSites()
-
- addExternalSite.account = account
- addExternalSite.idExternalSite = externalSites.idExternalSite
- addExternalSite.icon = externalSites.icon
- addExternalSite.lang = externalSites.lang
- addExternalSite.name = externalSites.name
- addExternalSite.url = externalSites.url
- addExternalSite.type = externalSites.type
-
- realm.add(addExternalSite)
- }
- }
- func deleteExternalSitesForAccount(_ account: String) {
-
- let realm = try! Realm()
-
- let results = realm.objects(tableExternalSites.self).filter("account = %@", account)
- try! realm.write {
- realm.delete(results)
- }
- }
-
- func getAllExternalSitesWithPredicate(_ predicate: NSPredicate) -> [tableExternalSites] {
-
- let realm = try! Realm()
-
- let results = realm.objects(tableExternalSites.self).filter(predicate).sorted(byKeyPath: "idExternalSite", ascending: true)
-
- return Array(results)
- }
- //MARK: -
- //MARK: Table GPS
-
- func addGeocoderLocation(_ location: String, placemarkAdministrativeArea: String, placemarkCountry: String, placemarkLocality: String, placemarkPostalCode: String, placemarkThoroughfare: String, latitude: String, longitude: String) {
- let realm = try! Realm()
- // Verify if exists
- let results = realm.objects(tableGPS.self).filter("latitude = %@ AND longitude = %@", latitude, longitude)
- if (results.count > 0) {
- return
- }
-
- try! realm.write {
-
- // Add new GPS
- let addGPS = tableGPS()
-
- addGPS.location = location
- addGPS.placemarkAdministrativeArea = placemarkAdministrativeArea
- addGPS.placemarkCountry = placemarkCountry
- addGPS.placemarkLocality = placemarkLocality
- addGPS.placemarkPostalCode = placemarkPostalCode
- addGPS.placemarkThoroughfare = placemarkThoroughfare
- addGPS.latitude = latitude
- addGPS.longitude = longitude
-
- realm.add(addGPS)
- }
- }
-
- func getLocationFromGeoLatitude(_ latitude: String, longitude: String) -> String? {
-
- let realm = try! Realm()
-
- let results = realm.objects(tableGPS.self).filter("latitude = %@ AND longitude = %@", latitude, longitude)
-
- if (results.count == 0) {
- return nil
- } else {
- return results[0].location
- }
- }
- //MARK: -
- //MARK: Table Share
-
- func addShareLink(_ share: String, fileName: String, serverUrl: String, account: String) -> [String:String] {
-
- let realm = try! Realm()
-
- // Verify if exists
- let results = realm.objects(tableShare.self).filter("account = %@ AND fileName = %@ AND serverUrl = %@", account, fileName, serverUrl)
- if (results.count > 0) {
- try! realm.write {
- results[0].shareLink = share;
- }
-
- } else {
-
- // Add new record
- try! realm.write {
-
- let addShare = tableShare()
-
- addShare.account = account
- addShare.fileName = fileName
- addShare.serverUrl = serverUrl
- addShare.shareLink = share
-
- realm.add(addShare)
- }
- }
-
- return ["\(serverUrl)\(fileName)" : share]
- }
- func addShareUserAndGroup(_ share: String, fileName: String, serverUrl: String, account: String) -> [String:String] {
-
- let realm = try! Realm()
-
- // Verify if exists
- let results = realm.objects(tableShare.self).filter("account = %@ AND fileName = %@ AND serverUrl = %@", account, fileName, serverUrl)
- if (results.count > 0) {
- try! realm.write {
- results[0].shareUserAndGroup = share;
- }
-
- } else {
-
- // Add new record
- try! realm.write {
-
- let addShare = tableShare()
-
- addShare.account = account
- addShare.fileName = fileName
- addShare.serverUrl = serverUrl
- addShare.shareUserAndGroup = share
-
- realm.add(addShare)
- }
- }
-
- return ["\(serverUrl)\(fileName)" : share]
- }
-
- func unShare(_ share: String, fileName: String, serverUrl: String, sharesLink: [String:String], sharesUserAndGroup: [String:String], account: String) -> [Any] {
-
- var sharesLink = sharesLink
- var sharesUserAndGroup = sharesUserAndGroup
-
- let realm = try! Realm()
-
- let results = realm.objects(tableShare.self).filter("account = %@ AND (shareLink CONTAINS %@ OR shareUserAndGroup CONTAINS %@)", account, share, share)
- if (results.count > 0) {
-
- let result = results[0]
-
- realm.beginWrite()
-
- if (result.shareLink.contains(share)) {
- result.shareLink = ""
- }
-
- if (result.shareUserAndGroup.contains(share)) {
-
- var shares : [String] = result.shareUserAndGroup.components(separatedBy: ",")
- if let index = shares.index(of:share) {
- shares.remove(at: index)
- }
- result.shareUserAndGroup = shares.joined(separator: ",")
- }
-
- if (result.shareLink.characters.count > 0) {
- sharesLink.updateValue(result.shareLink, forKey:"\(serverUrl)\(fileName)")
- } else {
- sharesLink.removeValue(forKey: "\(serverUrl)\(fileName)")
- }
-
- if (result.shareUserAndGroup.characters.count > 0) {
- sharesUserAndGroup.updateValue(result.shareUserAndGroup, forKey:"\(serverUrl)\(fileName)")
- } else {
- sharesUserAndGroup.removeValue(forKey: "\(serverUrl)\(fileName)")
- }
-
- if (result.shareLink.characters.count == 0 && result.shareUserAndGroup.characters.count == 0) {
- realm.delete(result)
- }
- try! realm.commitWrite()
- }
-
- return [sharesLink, sharesUserAndGroup]
- }
-
- func removeShareActiveAccount(_ account: String) {
-
- let realm = try! Realm()
-
- let results = realm.objects(tableShare.self).filter("account = %@", account)
- try! realm.write {
- realm.delete(results)
- }
- }
-
- func updateShare(_ items: [String:OCSharedDto], account: String, activeUrl: String) -> [Any] {
-
- var sharesLink = [String:String]()
- var sharesUserAndGroup = [String:String]()
- self.removeShareActiveAccount(account)
-
- var itemsLink = [OCSharedDto]()
- var itemsUsersAndGroups = [OCSharedDto]()
-
- for (_, itemOCSharedDto) in items {
-
- if (itemOCSharedDto.shareType == Int(shareTypeLink.rawValue)) {
- itemsLink.append(itemOCSharedDto)
- }
-
- if (itemOCSharedDto.shareWith.characters.count > 0 && (itemOCSharedDto.shareType == Int(shareTypeUser.rawValue) || itemOCSharedDto.shareType == Int(shareTypeGroup.rawValue) || itemOCSharedDto.shareType == Int(shareTypeRemote.rawValue) )) {
- itemsUsersAndGroups.append(itemOCSharedDto)
- }
- }
-
- // Manage sharesLink
- for itemOCSharedDto in itemsLink {
-
- let fullPath = CCUtility.getHomeServerUrlActiveUrl(activeUrl) + "\(itemOCSharedDto.path!)"
- let fileName = NSString(string: fullPath).lastPathComponent
- var serverUrl = NSString(string: fullPath).substring(to: (fullPath.characters.count - fileName.characters.count - 1))
-
- if serverUrl.hasSuffix("/") {
- serverUrl = NSString(string: serverUrl).substring(to: (serverUrl.characters.count - 1))
- }
-
- if itemOCSharedDto.idRemoteShared > 0 {
- let sharesLinkReturn = self.addShareLink("\(itemOCSharedDto.idRemoteShared)", fileName: fileName, serverUrl: serverUrl, account: account)
- for (key,value) in sharesLinkReturn {
- sharesLink.updateValue(value, forKey:key)
- }
- }
- }
-
- // Manage sharesUserAndGroup
-
- var paths = [String:[String]]()
-
- for itemOCSharedDto in itemsUsersAndGroups {
-
- if paths[itemOCSharedDto.path] != nil {
-
- var share : [String] = paths[itemOCSharedDto.path]!
- share.append("\(itemOCSharedDto.idRemoteShared)")
- paths[itemOCSharedDto.path] = share
-
- } else {
-
- paths[itemOCSharedDto.path] = ["\(itemOCSharedDto.idRemoteShared)"]
- }
- }
-
- for (path, idsRemoteSharedArray) in paths {
-
- let idsRemoteShared = idsRemoteSharedArray.joined(separator: ",")
-
- print("[LOG] share \(String(describing: idsRemoteShared))")
-
- let fullPath = CCUtility.getHomeServerUrlActiveUrl(activeUrl) + "\(path)"
- let fileName = NSString(string: fullPath).lastPathComponent
- var serverUrl = NSString(string: fullPath).substring(to: (fullPath.characters.count - fileName.characters.count - 1))
-
- if serverUrl.hasSuffix("/") {
- serverUrl = NSString(string: serverUrl).substring(to: (serverUrl.characters.count - 1))
- }
-
- let sharesUserAndGroupReturn = self.addShareUserAndGroup(idsRemoteShared, fileName: fileName, serverUrl: serverUrl, account: account)
- for (key,value) in sharesUserAndGroupReturn {
- sharesUserAndGroup.updateValue(value, forKey:key)
- }
- }
-
- return [sharesLink, sharesUserAndGroup]
- }
-
- func getSharesAccount(_ account: String) -> [Any] {
- var sharesLink = [String:String]()
- var sharesUserAndGroup = [String:String]()
-
- let realm = try! Realm()
- let results = realm.objects(tableShare.self).filter("account = %@", account)
-
- for resultShare in results {
-
- if (resultShare.shareLink.characters.count > 0) {
- sharesLink = [resultShare.shareLink: "\(resultShare.serverUrl)\(resultShare.fileName)"]
- }
-
- if (resultShare.shareUserAndGroup.characters.count > 0) {
- sharesUserAndGroup = [resultShare.shareUserAndGroup: "\(resultShare.serverUrl)\(resultShare.fileName)"]
- }
- }
-
- return [sharesLink, sharesUserAndGroup]
- }
-
- //MARK: -
- }
|