mirror of
https://github.com/ethauvin/kobalt.git
synced 2025-04-25 16:07:12 -07:00
Normalize.
This commit is contained in:
parent
2a7775529d
commit
981bbbacb6
1 changed files with 2 additions and 2 deletions
|
@ -115,8 +115,8 @@ class KFiles {
|
||||||
*/
|
*/
|
||||||
fun joinFileAndMakeDir(vararg ts: String) = joinDir(joinAndMakeDir(ts.slice(0..ts.size - 2)), ts[ts.size - 1])
|
fun joinFileAndMakeDir(vararg ts: String) = joinDir(joinAndMakeDir(ts.slice(0..ts.size - 2)), ts[ts.size - 1])
|
||||||
|
|
||||||
fun fixSlashes(f: File) = KFiles.fixSlashes(f.path)
|
fun fixSlashes(f: File) = f.normalize().path.replace('\\', '/')
|
||||||
fun fixSlashes(s: String) = s.replace('\\', '/')
|
fun fixSlashes(s: String) = fixSlashes(File(s))
|
||||||
|
|
||||||
fun makeDir(dir: String, s: String? = null) =
|
fun makeDir(dir: String, s: String? = null) =
|
||||||
(if (s != null) File(dir, s) else File(dir)).apply { mkdirs() }
|
(if (s != null) File(dir, s) else File(dir)).apply { mkdirs() }
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue