Move deepness level to constant variable.
This commit is contained in:
@@ -1,5 +1,7 @@
|
|||||||
import AppKit
|
import AppKit
|
||||||
|
|
||||||
|
fileprivate let INDEX_DEEPNESS = 2
|
||||||
|
|
||||||
struct Program {
|
struct Program {
|
||||||
var path: String = ""
|
var path: String = ""
|
||||||
var name: String = ""
|
var name: String = ""
|
||||||
@@ -106,7 +108,7 @@ final class PathManager {
|
|||||||
// allocations.
|
// allocations.
|
||||||
public func rebuildIndex(at path: String) {
|
public func rebuildIndex(at path: String) {
|
||||||
paths[path] = []
|
paths[path] = []
|
||||||
paths[path] = indexDirs(at: path, deepness: 2)
|
paths[path] = indexDirs(at: path, deepness: INDEX_DEEPNESS)
|
||||||
}
|
}
|
||||||
|
|
||||||
public func indexDirs(at path: String, deepness: Int) -> [Program] {
|
public func indexDirs(at path: String, deepness: Int) -> [Program] {
|
||||||
|
|||||||
Reference in New Issue
Block a user