Files
Memola/Memola/Utilies/Extensions/Data++.swift
2024-07-06 14:20:31 +07:00

19 lines
393 B
Swift

//
// Data++.swift
// Memola
//
// Created by Dscyre Scotti on 6/16/24.
//
import Foundation
extension Data {
func getBookmarkURL() -> URL? {
var isStale = false
guard let bookmarkURL = try? URL(resolvingBookmarkData: self, options: .withoutUI, relativeTo: nil, bookmarkDataIsStale: &isStale) else {
return nil
}
return bookmarkURL
}
}