revenge-tweak/Sources/RevengeTweak/Utils.x.swift
Cristiandis d21801c05e
feat: change to support Revenge
Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Palm <git@palmdevs.me>
2024-09-15 04:09:09 +07:00

16 lines
577 B
Swift

import Foundation
func getPyoncordDirectory() -> URL {
let documentDirectoryURL = try! FileManager.default.url(
for: .documentDirectory, in: .userDomainMask, appropriateFor: nil, create: false)
let pyoncordFolderURL = documentDirectoryURL.appendingPathComponent("pyoncord")
// Create the "pyoncord" folder if it doesn't exist
if !FileManager.default.fileExists(atPath: pyoncordFolderURL.path) {
try! FileManager.default.createDirectory(
at: pyoncordFolderURL, withIntermediateDirectories: true, attributes: nil)
}
return pyoncordFolderURL
}