Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions Sources/Extensions.swift
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,13 @@ public extension Bundle {
return str.flatMap(Path.init)
}

/// Returns the path for requested resource in this bundle.
func path2(forResource: String, ofType: String?, inDirectory: String?) -> Path? {
let f: (String?, String?, String?) -> String? = path(forResource:ofType:inDirectory:)
let str = f(forResource, ofType, inDirectory)
return str.flatMap(Path.init)
}

/**
Returns the path for the shared-frameworks directory in this bundle.
- Note: This is typically `ShareFrameworks`
Expand Down