diff options
author | Paul Phillips <paulp@improving.org> | 2010-01-29 19:11:38 +0000 |
---|---|---|
committer | Paul Phillips <paulp@improving.org> | 2010-01-29 19:11:38 +0000 |
commit | bb149d1b96015d83e58de5ea9b380550267c4f06 (patch) | |
tree | ef805e2c02a29e96f5703790c6f91b9cabb091ea /src/library/scala/util/Properties.scala | |
parent | ad0fd8bca3c41a15ff688a7ca5e3278fa2ce127b (diff) | |
download | scala-bb149d1b96015d83e58de5ea9b380550267c4f06.tar.gz scala-bb149d1b96015d83e58de5ea9b380550267c4f06.tar.bz2 scala-bb149d1b96015d83e58de5ea9b380550267c4f06.zip |
A few compiler IO lib bits I have been needing:...
A few compiler IO lib bits I have been needing: some basic conveniences
for directories and sockets, and some cleanups in CompileSocket. Review
by community.
Diffstat (limited to 'src/library/scala/util/Properties.scala')
-rw-r--r-- | src/library/scala/util/Properties.scala | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/library/scala/util/Properties.scala b/src/library/scala/util/Properties.scala index 73b5cf855a..f0d899ea98 100644 --- a/src/library/scala/util/Properties.scala +++ b/src/library/scala/util/Properties.scala @@ -56,12 +56,12 @@ private[scala] trait PropertiesTrait /** This is the encoding to use reading in source files, overridden with -encoding * Note that it uses "prop" i.e. looks in the scala jar, not the system properties. */ - val sourceEncoding = prop("file.encoding", "UTF8") + val sourceEncoding = prop("file.encoding", "UTF-8") /** This is the default text encoding, overridden (unreliably) with * JAVA_OPTS="-Dfile.encoding=Foo" */ - val encodingString = sysprop("file.encoding", "UTF8") + val encodingString = sysprop("file.encoding", "UTF-8") val isWin = sysprop("os.name") startsWith "Windows" val isMac = sysprop("java.vendor") startsWith "Apple" @@ -72,6 +72,8 @@ private[scala] trait PropertiesTrait val javaVmInfo = sysprop("java.vm.info") val javaVersion = sysprop("java.version") val tmpDir = sysprop("java.io.tmpdir") + val homeDir = sysprop("user.home") + val currentDir = sysprop("user.dir") val userName = sysprop("user.name") val scalaHome = sysprop("scala.home", null) // XXX places do null checks... |