|
From: <cr...@us...> - 2008-05-29 13:47:56
|
Revision: 4140
http://jnode.svn.sourceforge.net/jnode/?rev=4140&view=rev
Author: crawley
Date: 2008-05-29 06:47:51 -0700 (Thu, 29 May 2008)
Log Message:
-----------
Converted PwdCommand
Modified Paths:
--------------
trunk/fs/descriptors/org.jnode.fs.command.xml
trunk/fs/src/fs/org/jnode/fs/command/PwdCommand.java
Modified: trunk/fs/descriptors/org.jnode.fs.command.xml
===================================================================
--- trunk/fs/descriptors/org.jnode.fs.command.xml 2008-05-29 12:59:10 UTC (rev 4139)
+++ trunk/fs/descriptors/org.jnode.fs.command.xml 2008-05-29 13:47:51 UTC (rev 4140)
@@ -104,6 +104,9 @@
<argument argLabel="fsPath" description="the file system's root directory"/>
</sequence>
</syntax>
+ <syntax alias="pwd">
+ <empty description="show the pathname for the current directory"/>
+ </syntax>
</extension>
Modified: trunk/fs/src/fs/org/jnode/fs/command/PwdCommand.java
===================================================================
--- trunk/fs/src/fs/org/jnode/fs/command/PwdCommand.java 2008-05-29 12:59:10 UTC (rev 4139)
+++ trunk/fs/src/fs/org/jnode/fs/command/PwdCommand.java 2008-05-29 13:47:51 UTC (rev 4140)
@@ -27,23 +27,22 @@
import org.jnode.shell.AbstractCommand;
import org.jnode.shell.CommandLine;
-import org.jnode.shell.help.Help;
/**
* @author Martin Husted Hartvig (ha...@jn...)
*/
public class PwdCommand extends AbstractCommand
{
- public static Help.Info HELP_INFO = new Help.Info("pwd", "show the name of current working directory");
+ public PwdCommand() {
+ super("show the name of current working directory");
+ }
- public static void main(String[] args) throws Exception
- {
- new PwdCommand().execute(args);
- }
+ public static void main(String[] args) throws Exception {
+ new PwdCommand().execute(args);
+ }
- public void execute(CommandLine commandLine, InputStream in, PrintStream out, PrintStream err) throws Exception
- {
- File file = new File("");
- out.println(file.getAbsolutePath());
- }
+ public void execute(CommandLine commandLine, InputStream in, PrintStream out, PrintStream err) {
+ File file = new File("");
+ out.println(file.getAbsolutePath());
+ }
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|