Skip to content

Instantly share code, notes, and snippets.

@evgeny-goldin
Created October 27, 2011 16:58
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save evgeny-goldin/1320133 to your computer and use it in GitHub Desktop.
Save evgeny-goldin/1320133 to your computer and use it in GitHub Desktop.
new File( 'c:' ).canonicalPath
C:\Users\evgeny>java -version
java version "1.6.0_27"
Java(TM) SE Runtime Environment (build 1.6.0_27-b07)
Java HotSpot(TM) Client VM (build 20.2-b06, mixed mode, sharing)
C:\Users\evgeny>groovy -version
Groovy Version: 1.8.3 JVM: 1.6.0_27
C:\Users\evgeny>groovy -e "print new File( 'c:' ).canonicalPath"
C:\Users\evgeny
C:\Users\evgeny>cd .gradle
C:\Users\evgeny\.gradle>groovy -e "print new File( 'c:' ).canonicalPath"
C:\Users\evgeny\.gradle
C:\Users\evgeny\.gradle>cd \
C:\>groovy -e "print new File( 'c:' ).canonicalPath"
C:\
C:\>d:
D:\>groovy -e "print new File( 'c:' ).canonicalPath"
C:\
D:\>cd Temp
D:\Temp>groovy -e "print new File( 'c:' ).canonicalPath"
C:\
D:\Temp>c:
C:\>groovy -e "print new File( 'c:' ).canonicalPath"
C:\
C:\>cd .m2
C:\.m2>groovy -e "print new File( 'c:' ).canonicalPath"
C:\.m2
C:\.m2>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment