forked from github/CopilotForXcode
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathWorkspaceFileProvider.swift
More file actions
29 lines (23 loc) · 1.01 KB
/
WorkspaceFileProvider.swift
File metadata and controls
29 lines (23 loc) · 1.01 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
import Foundation
import ConversationServiceProvider
public protocol WorkspaceFileProvider {
func getSubprojectURLs(in workspaceURL: URL) -> [URL]
func getFilesInActiveWorkspace(workspaceURL: URL, workspaceRootURL: URL) -> [FileReference]
func isXCProject(_ url: URL) -> Bool
func isXCWorkspace(_ url: URL) -> Bool
}
public class FileChangeWatcherWorkspaceFileProvider: WorkspaceFileProvider {
public init() {}
public func getSubprojectURLs(in workspaceURL: URL) -> [URL] {
return WorkspaceFile.getSubprojectURLs(in: workspaceURL)
}
public func getFilesInActiveWorkspace(workspaceURL: URL, workspaceRootURL: URL) -> [FileReference] {
return WorkspaceFile.getFilesInActiveWorkspace(workspaceURL: workspaceURL, workspaceRootURL: workspaceRootURL)
}
public func isXCProject(_ url: URL) -> Bool {
return WorkspaceFile.isXCProject(url)
}
public func isXCWorkspace(_ url: URL) -> Bool {
return WorkspaceFile.isXCWorkspace(url)
}
}