[Mathlib-commitlog] SF.net SVN: mathlib:[593] JMathLib/trunk/src/jmathlib/toolbox/io/pwd.java
Status: Beta
Brought to you by:
st_mueller
|
From: <st_...@us...> - 2008-12-31 15:27:05
|
Revision: 593
http://mathlib.svn.sourceforge.net/mathlib/?rev=593&view=rev
Author: st_mueller
Date: 2008-12-31 15:26:56 +0000 (Wed, 31 Dec 2008)
Log Message:
-----------
initial commit
Added Paths:
-----------
JMathLib/trunk/src/jmathlib/toolbox/io/pwd.java
Added: JMathLib/trunk/src/jmathlib/toolbox/io/pwd.java
===================================================================
--- JMathLib/trunk/src/jmathlib/toolbox/io/pwd.java (rev 0)
+++ JMathLib/trunk/src/jmathlib/toolbox/io/pwd.java 2008-12-31 15:26:56 UTC (rev 593)
@@ -0,0 +1,34 @@
+package jmathlib.toolbox.io;
+
+import jmathlib.core.tokens.*;
+import jmathlib.core.tokens.numbertokens.DoubleNumberToken;
+import jmathlib.core.functions.ExternalFunction;
+import java.io.*;
+
+public class pwd extends ExternalFunction
+{
+ public OperandToken evaluate(Token[] operands)
+ {
+
+ File f = getWorkingDirectory();
+
+ return new CharToken(f.getAbsolutePath());
+
+ } // end eval
+}
+
+/*
+@GROUP
+IO
+@SYNTAX
+pwd
+@DOC
+displays the current working directory
+@EXAMPLES
+<programlisting>
+pwd
+</programlisting>
+@SEE
+cd, createnewfile, dir, exist, mkdir, rmdir, delete, isfile, ishidden, lastmodified
+*/
+
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|