Last active
March 26, 2021 19:56
-
-
Save giovani-pereira-ifood/4b99a60633d945a25af76fb17f0ab749 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
private func getReferenceFilePath() throws -> URL { | |
let fileURL = URL(fileURLWithPath: #file, isDirectory: false) | |
let referenceFileDirectotyURL = fileURL | |
.deletingLastPathComponent().deletingLastPathComponent() | |
.appendingPathComponent("ReferenceFolder") | |
let referenceFileURL = referenceFileDirectotyURL | |
.appendingPathComponent("referenceFile") | |
.appendingPathExtension("json") | |
guard FileManager.default.fileExists(atPath: referenceFileURL.path) else { | |
throw IconTestError.unableToFindFileAtReferencePath | |
} | |
return referenceFileURL | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment