提交 3fa0561f 编写于 作者: E Evgeny Gerashchenko

Added global constants for OS_SEPARATOR and VFS_SEPARATOR.

上级 dfd3f50c
......@@ -106,14 +106,15 @@ public class PhysicalVirtualFile(path : String) : VirtualFile(path) {
}
}
private val OS_SEPARATOR = java.io.File.separator.sure()
private val VFS_SEPARATOR = "/"
private fun String.toSystemDependentPath() : String {
// FIXME constants should be extracted (NPE in compiler, KT-1111)
return this.replaceAll("/", java.io.File.separator.sure())
return this.replaceAll(VFS_SEPARATOR, OS_SEPARATOR)
}
private fun String.toSystemIndependentPath() : String {
// FIXME constants should be extracted (NPE in compiler, KT-1111)
return this.replaceAll(java.io.File.separator.sure(), "/")
return this.replaceAll(OS_SEPARATOR, VFS_SEPARATOR)
}
/**
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册