File tree Expand file tree Collapse file tree 1 file changed +16
-0
lines changed Expand file tree Collapse file tree 1 file changed +16
-0
lines changed Original file line number Diff line number Diff line change @@ -81,6 +81,14 @@ public final class FileHandler {
8181 return true
8282 }
8383
84+ public func prependSearchPath( _ path: String ) -> Bool {
85+ guard self . isDirectory ( atPath: path) else {
86+ return false
87+ }
88+ self . searchUrls. insert ( URL ( fileURLWithPath: path, isDirectory: true ) , at: 0 )
89+ return true
90+ }
91+
8492 public func addLibrarySearchPath( _ path: String ) -> Bool {
8593 guard self . isDirectory ( atPath: path) else {
8694 return false
@@ -89,6 +97,14 @@ public final class FileHandler {
8997 return true
9098 }
9199
100+ public func prependLibrarySearchPath( _ path: String ) -> Bool {
101+ guard self . isDirectory ( atPath: path) else {
102+ return false
103+ }
104+ self . librarySearchUrls. insert ( URL ( fileURLWithPath: path, isDirectory: true ) , at: 0 )
105+ return true
106+ }
107+
92108 public func filePath( forFile name: String , relativeTo root: String ? = nil ) -> String ? {
93109 return self . searchFile ( withName: name,
94110 ofType: " scm " ,
You can’t perform that action at this time.
0 commit comments