mirror of https://github.com/sbt/sbt.git
Add distinctPath
This commit is contained in:
parent
4bae8b3acb
commit
16b95a4d62
|
|
@ -7,5 +7,6 @@
|
|||
### Improvements
|
||||
|
||||
- Renames `distinct` method on `PathFinder` to `distinctName`. [#1973][1973] by [@eed3si9n][@eed3si9n]
|
||||
- Adds `distinctPath` method on `PathFinder`. [#1973][1973] by [@eed3si9n][@eed3si9n]
|
||||
|
||||
### Bug fixes
|
||||
|
|
|
|||
|
|
@ -181,6 +181,11 @@ sealed abstract class PathFinder {
|
|||
@deprecated("Use distinctName", "0.13.9")
|
||||
def distinct: PathFinder = distinctName
|
||||
|
||||
/**
|
||||
* Create a PathFinder from this one where each path has a unique absolute path.
|
||||
*/
|
||||
def distinctPath: PathFinder = PathFinder { get.map(p => (p.absolutePath, p)).toMap.values }
|
||||
|
||||
/** Constructs a string by evaluating this finder, converting the resulting Paths to absolute path strings, and joining them with the platform path separator.*/
|
||||
final def absString = Path.makeString(get)
|
||||
/** Constructs a debugging string for this finder by evaluating it and separating paths by newlines.*/
|
||||
|
|
|
|||
Loading…
Reference in New Issue