make gradle zip directory drop helper function nicer
This commit is contained in:
parent
9f48270a0a
commit
227ac27652
2 changed files with 8 additions and 3 deletions
|
|
@ -74,5 +74,10 @@ fun Directory.filesChecksum() = asFileTree
|
|||
|
||||
|
||||
/** Drop the first [count] directories from the path */
|
||||
fun FileCopyDetails.dropDirectories(count: Int = 1): RelativePath =
|
||||
fun FileCopyDetails.dropDirectories(count: Int): RelativePath =
|
||||
RelativePath(true, *relativePath.segments.drop(count).toTypedArray())
|
||||
|
||||
|
||||
/** Drop the first directory from the path */
|
||||
fun FileCopyDetails.dropDirectory(): RelativePath =
|
||||
dropDirectories(1)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue