fun split()

in server/src/main/kotlin/com/jetbrains/teamcity/plugins/unrealengine/server/build/status/ugs/PerforceDepotPathSplitter.kt [32:41]


    fun split(depotPath: PerforceDepotPath): Pair<PerforceStream, PerforceFilePath> {
        val parts =
            depotPath.value
                .lowercase()
                .trimEnd('/')
                .split("/")
        val stream = PerforceStream(parts.take(4).joinToString("/"))
        val filePath = PerforceFilePath(parts.drop(4).joinToString("/"))
        return stream to filePath
    }