Skip to content

Commit

Permalink
Remove localPathForNCFile, no longer used
Browse files Browse the repository at this point in the history
Signed-off-by: Claudio Cambra <[email protected]>
  • Loading branch information
claucambra committed May 14, 2024
1 parent fa52208 commit 7e5bbd5
Showing 1 changed file with 0 additions and 20 deletions.
20 changes: 0 additions & 20 deletions Sources/NextcloudFileProviderKit/Utilities/LocalFiles.swift
Original file line number Diff line number Diff line change
Expand Up @@ -48,23 +48,3 @@ public func pathForFileProviderTempFilesForDomain(_ domain: NSFileProviderDomain
let fileProviderDataUrl = try fpManager.temporaryDirectoryURL()
return fileProviderDataUrl.appendingPathComponent("TemporaryNextcloudFiles/")
}

public func localPathForNCFile(ocId _: String, fileNameView: String, domain: NSFileProviderDomain) throws
-> URL
{
guard let fileProviderFilesPathUrl = try pathForFileProviderTempFilesForDomain(domain) else {
lfuLogger.error(
"Unable to get path for file provider temp files for domain: \(domain.displayName, privacy: .public)"
)
throw URLError(.badURL)
}

let filePathUrl = fileProviderFilesPathUrl.appendingPathComponent(fileNameView)
let filePath = filePathUrl.path

if !FileManager.default.fileExists(atPath: filePath) {
FileManager.default.createFile(atPath: filePath, contents: nil)
}

return filePathUrl
}

0 comments on commit 7e5bbd5

Please sign in to comment.