You are viewing a plain text version of this content. The canonical link for it is here.
Posted to scm@geronimo.apache.org by jd...@apache.org on 2008/11/28 10:28:58 UTC
svn commit: r721400 - in /geronimo/gshell/trunk: ./
gshell-assembly/src/main/underlay/etc/ gshell-commands/
gshell-commands/gshell-fileutils/
gshell-commands/gshell-fileutils/src/main/java/org/apache/geronimo/gshell/commands/fileutils/
gshell-commands/...
Author: jdillon
Date: Fri Nov 28 01:28:57 2008
New Revision: 721400
URL: http://svn.apache.org/viewvc?rev=721400&view=rev
Log:
Renamed gshell-commands/gshell-vfs -> gshell-commands/gshell-fileutils
Added:
geronimo/gshell/trunk/gshell-commands/gshell-fileutils/ (props changed)
- copied from r721396, geronimo/gshell/trunk/gshell-commands/gshell-vfs/
geronimo/gshell/trunk/gshell-commands/gshell-fileutils/src/main/java/org/apache/geronimo/gshell/commands/fileutils/
geronimo/gshell/trunk/gshell-commands/gshell-fileutils/src/main/java/org/apache/geronimo/gshell/commands/fileutils/ChangeDirectoryAction.java (with props)
geronimo/gshell/trunk/gshell-commands/gshell-fileutils/src/main/java/org/apache/geronimo/gshell/commands/fileutils/CopyAction.java (with props)
geronimo/gshell/trunk/gshell-commands/gshell-fileutils/src/main/java/org/apache/geronimo/gshell/commands/fileutils/CurrentDirectoryAction.java (with props)
geronimo/gshell/trunk/gshell-commands/gshell-fileutils/src/main/java/org/apache/geronimo/gshell/commands/fileutils/FileInfoAction.java (with props)
geronimo/gshell/trunk/gshell-commands/gshell-fileutils/src/main/java/org/apache/geronimo/gshell/commands/fileutils/ListDirectoryAction.java (with props)
geronimo/gshell/trunk/gshell-commands/gshell-fileutils/src/main/java/org/apache/geronimo/gshell/commands/fileutils/RemoveAction.java (with props)
geronimo/gshell/trunk/gshell-commands/gshell-fileutils/src/main/java/org/apache/geronimo/gshell/commands/fileutils/TouchAction.java (with props)
geronimo/gshell/trunk/gshell-commands/gshell-fileutils/src/main/resources/org/apache/geronimo/gshell/commands/fileutils/
geronimo/gshell/trunk/gshell-commands/gshell-fileutils/src/main/resources/org/apache/geronimo/gshell/commands/fileutils/ChangeDirectoryAction.properties (with props)
geronimo/gshell/trunk/gshell-commands/gshell-fileutils/src/main/resources/org/apache/geronimo/gshell/commands/fileutils/CopyAction.properties (with props)
geronimo/gshell/trunk/gshell-commands/gshell-fileutils/src/main/resources/org/apache/geronimo/gshell/commands/fileutils/CurrentDirectoryAction.properties (with props)
geronimo/gshell/trunk/gshell-commands/gshell-fileutils/src/main/resources/org/apache/geronimo/gshell/commands/fileutils/FileInfoAction.properties (with props)
geronimo/gshell/trunk/gshell-commands/gshell-fileutils/src/main/resources/org/apache/geronimo/gshell/commands/fileutils/ListDirectoryAction.properties (with props)
geronimo/gshell/trunk/gshell-commands/gshell-fileutils/src/main/resources/org/apache/geronimo/gshell/commands/fileutils/RemoveAction.properties (with props)
geronimo/gshell/trunk/gshell-commands/gshell-fileutils/src/main/resources/org/apache/geronimo/gshell/commands/fileutils/TouchAction.properties (with props)
Removed:
geronimo/gshell/trunk/gshell-commands/gshell-fileutils/src/main/java/org/apache/geronimo/gshell/commands/vfs/
geronimo/gshell/trunk/gshell-commands/gshell-fileutils/src/main/resources/org/apache/geronimo/gshell/commands/vfs/
geronimo/gshell/trunk/gshell-commands/gshell-vfs/
Modified:
geronimo/gshell/trunk/gshell-assembly/src/main/underlay/etc/application.xml
geronimo/gshell/trunk/gshell-commands/gshell-fileutils/pom.xml
geronimo/gshell/trunk/gshell-commands/gshell-fileutils/src/main/resources/META-INF/gshell/components.xml
geronimo/gshell/trunk/gshell-commands/pom.xml
geronimo/gshell/trunk/pom.xml
Modified: geronimo/gshell/trunk/gshell-assembly/src/main/underlay/etc/application.xml
URL: http://svn.apache.org/viewvc/geronimo/gshell/trunk/gshell-assembly/src/main/underlay/etc/application.xml?rev=721400&r1=721399&r2=721400&view=diff
==============================================================================
--- geronimo/gshell/trunk/gshell-assembly/src/main/underlay/etc/application.xml (original)
+++ geronimo/gshell/trunk/gshell-assembly/src/main/underlay/etc/application.xml Fri Nov 28 01:28:57 2008
@@ -83,7 +83,7 @@
<bean class="org.apache.geronimo.gshell.artifact.Artifact">
<property name="group" value="org.apache.geronimo.gshell.commands"/>
- <property name="name" value="gshell-vfs"/>
+ <property name="name" value="gshell-fileutils"/>
<property name="version" value="${gshell.version}"/>
</bean>
Propchange: geronimo/gshell/trunk/gshell-commands/gshell-fileutils/
------------------------------------------------------------------------------
--- svn:ignore (added)
+++ svn:ignore Fri Nov 28 01:28:57 2008
@@ -0,0 +1 @@
+target-eclipse
Propchange: geronimo/gshell/trunk/gshell-commands/gshell-fileutils/
------------------------------------------------------------------------------
svn:mergeinfo =
Modified: geronimo/gshell/trunk/gshell-commands/gshell-fileutils/pom.xml
URL: http://svn.apache.org/viewvc/geronimo/gshell/trunk/gshell-commands/gshell-fileutils/pom.xml?rev=721400&r1=721396&r2=721400&view=diff
==============================================================================
--- geronimo/gshell/trunk/gshell-commands/gshell-fileutils/pom.xml (original)
+++ geronimo/gshell/trunk/gshell-commands/gshell-fileutils/pom.xml Fri Nov 28 01:28:57 2008
@@ -30,19 +30,11 @@
<version>1.0-alpha-2-SNAPSHOT</version>
</parent>
- <!--
- TODO: Rename to gshell-fileutils or gshell-coreutils to match up the linux rpm equiv?
-
- SEE:
- http://www.gnu.org/software/coreutils/
- http://www.gnu.org/software/coreutils/manual/coreutils.html
- -->
-
- <artifactId>gshell-vfs</artifactId>
- <name>GShell Commands :: VFS</name>
+ <artifactId>gshell-fileutils</artifactId>
+ <name>GShell Commands :: File Utils</name>
<description>
- Provides integration with Jakarta Commons VFS.
+ File utilities.
</description>
<dependencies>
Added: geronimo/gshell/trunk/gshell-commands/gshell-fileutils/src/main/java/org/apache/geronimo/gshell/commands/fileutils/ChangeDirectoryAction.java
URL: http://svn.apache.org/viewvc/geronimo/gshell/trunk/gshell-commands/gshell-fileutils/src/main/java/org/apache/geronimo/gshell/commands/fileutils/ChangeDirectoryAction.java?rev=721400&view=auto
==============================================================================
--- geronimo/gshell/trunk/gshell-commands/gshell-fileutils/src/main/java/org/apache/geronimo/gshell/commands/fileutils/ChangeDirectoryAction.java (added)
+++ geronimo/gshell/trunk/gshell-commands/gshell-fileutils/src/main/java/org/apache/geronimo/gshell/commands/fileutils/ChangeDirectoryAction.java Fri Nov 28 01:28:57 2008
@@ -0,0 +1,60 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.geronimo.gshell.commands.fileutils;
+
+import org.apache.commons.vfs.FileObject;
+import org.apache.geronimo.gshell.clp.Argument;
+import org.apache.geronimo.gshell.command.CommandContext;
+import org.apache.geronimo.gshell.io.IO;
+import org.apache.geronimo.gshell.vfs.FileObjects;
+import org.apache.geronimo.gshell.vfs.support.VfsActionSupport;
+
+/**
+ * Changes the current directory.
+ *
+ * @version $Rev$ $Date$
+ */
+public class ChangeDirectoryAction
+ extends VfsActionSupport
+{
+ @Argument
+ private String path;
+
+ public Object execute(final CommandContext context) throws Exception {
+ assert context != null;
+ IO io = context.getIo();
+
+ if (path == null) {
+ // TODO: May need to ask the Application for this, as it might be different depending on the context (ie. remote user, etc)
+ path = System.getProperty("user.home");
+ }
+
+ FileObject file = resolveFile(context, path);
+
+ ensureFileExists(file);
+ ensureFileHasChildren(file);
+
+ setCurrentDirectory(context, file);
+
+ FileObjects.close(file);
+
+ return Result.SUCCESS;
+ }
+}
\ No newline at end of file
Propchange: geronimo/gshell/trunk/gshell-commands/gshell-fileutils/src/main/java/org/apache/geronimo/gshell/commands/fileutils/ChangeDirectoryAction.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: geronimo/gshell/trunk/gshell-commands/gshell-fileutils/src/main/java/org/apache/geronimo/gshell/commands/fileutils/ChangeDirectoryAction.java
------------------------------------------------------------------------------
svn:keywords = Date Author Id Revision HeadURL
Propchange: geronimo/gshell/trunk/gshell-commands/gshell-fileutils/src/main/java/org/apache/geronimo/gshell/commands/fileutils/ChangeDirectoryAction.java
------------------------------------------------------------------------------
svn:mime-type = text/plain
Added: geronimo/gshell/trunk/gshell-commands/gshell-fileutils/src/main/java/org/apache/geronimo/gshell/commands/fileutils/CopyAction.java
URL: http://svn.apache.org/viewvc/geronimo/gshell/trunk/gshell-commands/gshell-fileutils/src/main/java/org/apache/geronimo/gshell/commands/fileutils/CopyAction.java?rev=721400&view=auto
==============================================================================
--- geronimo/gshell/trunk/gshell-commands/gshell-fileutils/src/main/java/org/apache/geronimo/gshell/commands/fileutils/CopyAction.java (added)
+++ geronimo/gshell/trunk/gshell-commands/gshell-fileutils/src/main/java/org/apache/geronimo/gshell/commands/fileutils/CopyAction.java Fri Nov 28 01:28:57 2008
@@ -0,0 +1,71 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.geronimo.gshell.commands.fileutils;
+
+import org.apache.commons.vfs.FileObject;
+import org.apache.commons.vfs.Selectors;
+import org.apache.geronimo.gshell.clp.Argument;
+import org.apache.geronimo.gshell.command.CommandContext;
+import org.apache.geronimo.gshell.io.IO;
+import org.apache.geronimo.gshell.vfs.FileObjects;
+import org.apache.geronimo.gshell.vfs.support.VfsActionSupport;
+
+/**
+ * Copies a file or directory.
+ *
+ * @version $Rev$ $Date$
+ */
+public class CopyAction
+ extends VfsActionSupport
+{
+ @Argument(index=0, required=true)
+ private String sourcePath;
+
+ @Argument(index=1, required=true)
+ private String targetPath;
+
+ // TODO: Add --recursive suport
+
+ // TODO: Add --verbose support
+
+ public Object execute(final CommandContext context) throws Exception {
+ assert context != null;
+ IO io = context.getIo();
+
+ FileObject source = resolveFile(context, sourcePath);
+ FileObject target = resolveFile(context, targetPath);
+
+ ensureFileExists(source);
+
+ // TODO: Validate more
+
+ if (target.exists() && target.getType().hasChildren()) {
+ target = target.resolveFile(source.getName().getBaseName());
+ }
+
+ log.info("Copying {} -> {}", source, target);
+
+ target.copyFrom(source, Selectors.SELECT_ALL);
+
+ FileObjects.closeAll(source, target);
+
+ return Result.SUCCESS;
+ }
+}
\ No newline at end of file
Propchange: geronimo/gshell/trunk/gshell-commands/gshell-fileutils/src/main/java/org/apache/geronimo/gshell/commands/fileutils/CopyAction.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: geronimo/gshell/trunk/gshell-commands/gshell-fileutils/src/main/java/org/apache/geronimo/gshell/commands/fileutils/CopyAction.java
------------------------------------------------------------------------------
svn:keywords = Date Author Id Revision HeadURL
Propchange: geronimo/gshell/trunk/gshell-commands/gshell-fileutils/src/main/java/org/apache/geronimo/gshell/commands/fileutils/CopyAction.java
------------------------------------------------------------------------------
svn:mime-type = text/plain
Added: geronimo/gshell/trunk/gshell-commands/gshell-fileutils/src/main/java/org/apache/geronimo/gshell/commands/fileutils/CurrentDirectoryAction.java
URL: http://svn.apache.org/viewvc/geronimo/gshell/trunk/gshell-commands/gshell-fileutils/src/main/java/org/apache/geronimo/gshell/commands/fileutils/CurrentDirectoryAction.java?rev=721400&view=auto
==============================================================================
--- geronimo/gshell/trunk/gshell-commands/gshell-fileutils/src/main/java/org/apache/geronimo/gshell/commands/fileutils/CurrentDirectoryAction.java (added)
+++ geronimo/gshell/trunk/gshell-commands/gshell-fileutils/src/main/java/org/apache/geronimo/gshell/commands/fileutils/CurrentDirectoryAction.java Fri Nov 28 01:28:57 2008
@@ -0,0 +1,47 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.geronimo.gshell.commands.fileutils;
+
+import org.apache.commons.vfs.FileObject;
+import org.apache.geronimo.gshell.command.CommandContext;
+import org.apache.geronimo.gshell.io.IO;
+import org.apache.geronimo.gshell.vfs.FileObjects;
+import org.apache.geronimo.gshell.vfs.support.VfsActionSupport;
+
+/**
+ * Displays the current directory.
+ *
+ * @version $Rev$ $Date$
+ */
+public class CurrentDirectoryAction
+ extends VfsActionSupport
+{
+ public Object execute(final CommandContext context) throws Exception {
+ assert context != null;
+ IO io = context.getIo();
+
+ FileObject dir = getCurrentDirectory(context);
+ io.info(dir.getName().getURI());
+
+ FileObjects.close(dir);
+
+ return Result.SUCCESS;
+ }
+}
\ No newline at end of file
Propchange: geronimo/gshell/trunk/gshell-commands/gshell-fileutils/src/main/java/org/apache/geronimo/gshell/commands/fileutils/CurrentDirectoryAction.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: geronimo/gshell/trunk/gshell-commands/gshell-fileutils/src/main/java/org/apache/geronimo/gshell/commands/fileutils/CurrentDirectoryAction.java
------------------------------------------------------------------------------
svn:keywords = Date Author Id Revision HeadURL
Propchange: geronimo/gshell/trunk/gshell-commands/gshell-fileutils/src/main/java/org/apache/geronimo/gshell/commands/fileutils/CurrentDirectoryAction.java
------------------------------------------------------------------------------
svn:mime-type = text/plain
Added: geronimo/gshell/trunk/gshell-commands/gshell-fileutils/src/main/java/org/apache/geronimo/gshell/commands/fileutils/FileInfoAction.java
URL: http://svn.apache.org/viewvc/geronimo/gshell/trunk/gshell-commands/gshell-fileutils/src/main/java/org/apache/geronimo/gshell/commands/fileutils/FileInfoAction.java?rev=721400&view=auto
==============================================================================
--- geronimo/gshell/trunk/gshell-commands/gshell-fileutils/src/main/java/org/apache/geronimo/gshell/commands/fileutils/FileInfoAction.java (added)
+++ geronimo/gshell/trunk/gshell-commands/gshell-fileutils/src/main/java/org/apache/geronimo/gshell/commands/fileutils/FileInfoAction.java Fri Nov 28 01:28:57 2008
@@ -0,0 +1,128 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.geronimo.gshell.commands.fileutils;
+
+import org.apache.commons.vfs.FileContent;
+import org.apache.commons.vfs.FileContentInfo;
+import org.apache.commons.vfs.FileObject;
+import org.apache.commons.vfs.FileSystemException;
+import org.apache.commons.vfs.FileType;
+import org.apache.geronimo.gshell.clp.Argument;
+import org.apache.geronimo.gshell.command.CommandContext;
+import org.apache.geronimo.gshell.io.IO;
+import org.apache.geronimo.gshell.vfs.FileObjects;
+import org.apache.geronimo.gshell.vfs.support.VfsActionSupport;
+
+import java.security.cert.Certificate;
+import java.text.DateFormat;
+import java.util.Date;
+import java.util.Map;
+
+/**
+ * Display information about a file.
+ *
+ * @version $Rev$ $Date$
+ */
+public class FileInfoAction
+ extends VfsActionSupport
+{
+ @Argument(required=true)
+ private String path;
+
+ public Object execute(final CommandContext context) throws Exception {
+ assert context != null;
+ IO io = context.getIo();
+
+ FileObject file = resolveFile(context, path);
+
+ io.info("URL: {}", file.getURL());
+ io.info("Name: {}", file.getName());
+ io.info("BaseName: {}", file.getName().getBaseName());
+ io.info("Extension: {}", file.getName().getExtension());
+ io.info("Path: {}", file.getName().getPath());
+ io.info("Scheme: {}", file.getName().getScheme());
+ io.info("URI: {}", file.getName().getURI());
+ io.info("Root URI: {}", file.getName().getRootURI());
+ io.info("Parent: {}", file.getName().getParent());
+ io.info("Type: {}", file.getType());
+ io.info("Exists: {}", file.exists());
+ io.info("Readable: {}", file.isReadable());
+ io.info("Writeable: {}", file.isWriteable());
+ io.info("Root path: {}", file.getFileSystem().getRoot().getName().getPath());
+
+ if (file.exists()) {
+ FileContent content = file.getContent();
+ FileContentInfo contentInfo = content.getContentInfo();
+ io.info("Content type: {}", contentInfo.getContentType());
+ io.info("Content encoding: {}", contentInfo.getContentEncoding());
+
+ try {
+ // noinspection unchecked
+ Map<String,Object> attrs = content.getAttributes();
+ if (attrs != null && !attrs.isEmpty()) {
+ io.info("Attributes:");
+ for (Map.Entry<String,Object> entry : attrs.entrySet()) {
+ io.info(" {}='{}'", entry.getKey(), entry.getValue());
+ }
+ }
+ }
+ catch (FileSystemException e) {
+ io.info("File attributes are NOT supported");
+ }
+
+ try {
+ Certificate[] certs = content.getCertificates();
+ if (certs != null && certs.length != 0) {
+ io.info("Certificate:");
+ for (Certificate cert : certs) {
+ io.info(" {}", cert);
+ }
+ }
+ }
+ catch (FileSystemException e) {
+ io.info("File certificates are NOT supported");
+ }
+
+ if (file.getType().equals(FileType.FILE)) {
+ io.info("Size: {} bytes", content.getSize());
+ }
+ else if (file.getType().hasChildren() && file.isReadable()) {
+ FileObject[] children = file.getChildren();
+ io.info("Directory with {} files", children.length);
+
+ for (int iterChildren = 0; iterChildren < children.length; iterChildren++) {
+ io.info("#{}:{}", iterChildren, children[iterChildren].getName());
+ if (iterChildren > 5) {
+ break;
+ }
+ }
+ }
+
+ io.info("Last modified: {}", DateFormat.getInstance().format(new Date(content.getLastModifiedTime())));
+ }
+ else {
+ io.info("The file does not exist");
+ }
+
+ FileObjects.close(file);
+
+ return Result.SUCCESS;
+ }
+}
Propchange: geronimo/gshell/trunk/gshell-commands/gshell-fileutils/src/main/java/org/apache/geronimo/gshell/commands/fileutils/FileInfoAction.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: geronimo/gshell/trunk/gshell-commands/gshell-fileutils/src/main/java/org/apache/geronimo/gshell/commands/fileutils/FileInfoAction.java
------------------------------------------------------------------------------
svn:keywords = Date Author Id Revision HeadURL
Propchange: geronimo/gshell/trunk/gshell-commands/gshell-fileutils/src/main/java/org/apache/geronimo/gshell/commands/fileutils/FileInfoAction.java
------------------------------------------------------------------------------
svn:mime-type = text/plain
Added: geronimo/gshell/trunk/gshell-commands/gshell-fileutils/src/main/java/org/apache/geronimo/gshell/commands/fileutils/ListDirectoryAction.java
URL: http://svn.apache.org/viewvc/geronimo/gshell/trunk/gshell-commands/gshell-fileutils/src/main/java/org/apache/geronimo/gshell/commands/fileutils/ListDirectoryAction.java?rev=721400&view=auto
==============================================================================
--- geronimo/gshell/trunk/gshell-commands/gshell-fileutils/src/main/java/org/apache/geronimo/gshell/commands/fileutils/ListDirectoryAction.java (added)
+++ geronimo/gshell/trunk/gshell-commands/gshell-fileutils/src/main/java/org/apache/geronimo/gshell/commands/fileutils/ListDirectoryAction.java Fri Nov 28 01:28:57 2008
@@ -0,0 +1,152 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.geronimo.gshell.commands.fileutils;
+
+import jline.ConsoleReader;
+import org.apache.commons.vfs.FileFilter;
+import org.apache.commons.vfs.FileFilterSelector;
+import org.apache.commons.vfs.FileName;
+import org.apache.commons.vfs.FileObject;
+import org.apache.commons.vfs.FileSelectInfo;
+import org.apache.commons.vfs.FileSystemException;
+import org.apache.geronimo.gshell.clp.Argument;
+import org.apache.geronimo.gshell.clp.Option;
+import org.apache.geronimo.gshell.command.CommandContext;
+import org.apache.geronimo.gshell.io.IO;
+import org.apache.geronimo.gshell.vfs.FileObjects;
+import org.apache.geronimo.gshell.vfs.support.VfsActionSupport;
+
+import java.util.ArrayList;
+import java.util.LinkedList;
+import java.util.List;
+
+/**
+ * List the contents of a file or directory.
+ *
+ * @version $Rev$ $Date$
+ */
+public class ListDirectoryAction
+ extends VfsActionSupport
+{
+ @Argument
+ private String path;
+
+ @Option(name="-l", aliases={"--long"})
+ private boolean longList;
+
+ @Option(name="-a", aliases={"--all"})
+ private boolean includeHidden;
+
+ @Option(name="-r", aliases={"--recursive"})
+ private boolean recursive;
+
+ public Object execute(final CommandContext context) throws Exception {
+ assert context != null;
+ IO io = context.getIo();
+
+ FileObject file;
+ if (path != null) {
+ file = resolveFile(context, path);
+ }
+ else {
+ file = getCurrentDirectory(context);
+ }
+
+ if (file.getType().hasChildren()) {
+ listChildren(io, file);
+ }
+ else {
+ io.info(file.getName().getPath());
+ }
+
+ FileObjects.close(file);
+
+ return Result.SUCCESS;
+ }
+
+ private void listChildren(final IO io, final FileObject dir) throws Exception {
+ assert io != null;
+ assert dir != null;
+
+ FileObject[] files;
+
+ if (includeHidden) {
+ files = dir.getChildren();
+ }
+ else {
+ FileFilter filter = new FileFilter() {
+ public boolean accept(final FileSelectInfo selection) {
+ assert selection != null;
+
+ try {
+ return !selection.getFile().isHidden();
+ }
+ catch (FileSystemException e) {
+ throw new RuntimeException(e);
+ }
+ }
+ };
+
+ files = dir.findFiles(new FileFilterSelector(filter));
+ }
+
+ ConsoleReader reader = io.createConsoleReader();
+ reader.setUsePagination(false);
+
+ List<String> names = new ArrayList<String>(files.length);
+ List<FileObject> dirs = new LinkedList<FileObject>();
+
+ for (FileObject file : files) {
+ String fileName = file.getName().getBaseName();
+
+ if (FileObjects.hasChildren(file)) {
+ fileName += FileName.SEPARATOR;
+
+ if (recursive) {
+ dirs.add(file);
+ }
+ }
+
+ names.add(fileName);
+
+ file.close();
+ }
+
+ if (longList) {
+ for (String name : names) {
+ io.out.println(name);
+ }
+ }
+ else {
+ reader.printColumns(names);
+ }
+
+ if (!dirs.isEmpty()) {
+ for (FileObject subdir : dirs) {
+ io.out.println();
+ io.out.print(subdir.getName().getBaseName());
+ io.out.print(":");
+ listChildren(io, subdir);
+ }
+ }
+
+ dir.close();
+ }
+}
\ No newline at end of file
Propchange: geronimo/gshell/trunk/gshell-commands/gshell-fileutils/src/main/java/org/apache/geronimo/gshell/commands/fileutils/ListDirectoryAction.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: geronimo/gshell/trunk/gshell-commands/gshell-fileutils/src/main/java/org/apache/geronimo/gshell/commands/fileutils/ListDirectoryAction.java
------------------------------------------------------------------------------
svn:keywords = Date Author Id Revision HeadURL
Propchange: geronimo/gshell/trunk/gshell-commands/gshell-fileutils/src/main/java/org/apache/geronimo/gshell/commands/fileutils/ListDirectoryAction.java
------------------------------------------------------------------------------
svn:mime-type = text/plain
Added: geronimo/gshell/trunk/gshell-commands/gshell-fileutils/src/main/java/org/apache/geronimo/gshell/commands/fileutils/RemoveAction.java
URL: http://svn.apache.org/viewvc/geronimo/gshell/trunk/gshell-commands/gshell-fileutils/src/main/java/org/apache/geronimo/gshell/commands/fileutils/RemoveAction.java?rev=721400&view=auto
==============================================================================
--- geronimo/gshell/trunk/gshell-commands/gshell-fileutils/src/main/java/org/apache/geronimo/gshell/commands/fileutils/RemoveAction.java (added)
+++ geronimo/gshell/trunk/gshell-commands/gshell-fileutils/src/main/java/org/apache/geronimo/gshell/commands/fileutils/RemoveAction.java Fri Nov 28 01:28:57 2008
@@ -0,0 +1,62 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.geronimo.gshell.commands.fileutils;
+
+import org.apache.commons.vfs.FileObject;
+import org.apache.commons.vfs.Selectors;
+import org.apache.geronimo.gshell.clp.Argument;
+import org.apache.geronimo.gshell.command.CommandContext;
+import org.apache.geronimo.gshell.io.IO;
+import org.apache.geronimo.gshell.vfs.FileObjects;
+import org.apache.geronimo.gshell.vfs.support.VfsActionSupport;
+
+/**
+ * Remove a file or directory.
+ *
+ * @version $Rev$ $Date$
+ */
+public class RemoveAction
+ extends VfsActionSupport
+{
+ @Argument(required=true)
+ private String path;
+
+ // TODO: Add --recursive support
+
+ // TODO: Add --verbose support
+
+ public Object execute(final CommandContext context) throws Exception {
+ assert context != null;
+ IO io = context.getIo();
+
+ FileObject file = resolveFile(context, path);
+
+ ensureFileExists(file);
+
+ try {
+ file.delete(Selectors.SELECT_SELF);
+ }
+ finally {
+ FileObjects.close(file);
+ }
+
+ return Result.SUCCESS;
+ }
+}
\ No newline at end of file
Propchange: geronimo/gshell/trunk/gshell-commands/gshell-fileutils/src/main/java/org/apache/geronimo/gshell/commands/fileutils/RemoveAction.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: geronimo/gshell/trunk/gshell-commands/gshell-fileutils/src/main/java/org/apache/geronimo/gshell/commands/fileutils/RemoveAction.java
------------------------------------------------------------------------------
svn:keywords = Date Author Id Revision HeadURL
Propchange: geronimo/gshell/trunk/gshell-commands/gshell-fileutils/src/main/java/org/apache/geronimo/gshell/commands/fileutils/RemoveAction.java
------------------------------------------------------------------------------
svn:mime-type = text/plain
Added: geronimo/gshell/trunk/gshell-commands/gshell-fileutils/src/main/java/org/apache/geronimo/gshell/commands/fileutils/TouchAction.java
URL: http://svn.apache.org/viewvc/geronimo/gshell/trunk/gshell-commands/gshell-fileutils/src/main/java/org/apache/geronimo/gshell/commands/fileutils/TouchAction.java?rev=721400&view=auto
==============================================================================
--- geronimo/gshell/trunk/gshell-commands/gshell-fileutils/src/main/java/org/apache/geronimo/gshell/commands/fileutils/TouchAction.java (added)
+++ geronimo/gshell/trunk/gshell-commands/gshell-fileutils/src/main/java/org/apache/geronimo/gshell/commands/fileutils/TouchAction.java Fri Nov 28 01:28:57 2008
@@ -0,0 +1,60 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.geronimo.gshell.commands.fileutils;
+
+import org.apache.commons.vfs.FileObject;
+import org.apache.geronimo.gshell.clp.Argument;
+import org.apache.geronimo.gshell.command.CommandContext;
+import org.apache.geronimo.gshell.command.CommandAction;
+import org.apache.geronimo.gshell.vfs.FileObjects;
+import org.apache.geronimo.gshell.vfs.support.VfsActionSupport;
+
+/**
+ * Sets the last-modified time of a file.
+ *
+ * @version $Rev$ $Date$
+ */
+public class TouchAction
+ extends VfsActionSupport
+{
+ @Argument(required=true)
+ private String path;
+
+ // TODO: Add options similar to UNIX touch (like -r FILE) see man page for more details.
+
+ public Object execute(final CommandContext context) throws Exception {
+ assert context != null;
+
+ FileObject file = resolveFile(context, path);
+
+ try {
+ if (!file.exists()) {
+ file.createFile();
+ }
+
+ file.getContent().setLastModifiedTime(System.currentTimeMillis());
+ }
+ finally {
+ FileObjects.close(file);
+ }
+
+ return CommandAction.Result.SUCCESS;
+ }
+}
\ No newline at end of file
Propchange: geronimo/gshell/trunk/gshell-commands/gshell-fileutils/src/main/java/org/apache/geronimo/gshell/commands/fileutils/TouchAction.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: geronimo/gshell/trunk/gshell-commands/gshell-fileutils/src/main/java/org/apache/geronimo/gshell/commands/fileutils/TouchAction.java
------------------------------------------------------------------------------
svn:keywords = Date Author Id Revision HeadURL
Propchange: geronimo/gshell/trunk/gshell-commands/gshell-fileutils/src/main/java/org/apache/geronimo/gshell/commands/fileutils/TouchAction.java
------------------------------------------------------------------------------
svn:mime-type = text/plain
Modified: geronimo/gshell/trunk/gshell-commands/gshell-fileutils/src/main/resources/META-INF/gshell/components.xml
URL: http://svn.apache.org/viewvc/geronimo/gshell/trunk/gshell-commands/gshell-fileutils/src/main/resources/META-INF/gshell/components.xml?rev=721400&r1=721396&r2=721400&view=diff
==============================================================================
--- geronimo/gshell/trunk/gshell-commands/gshell-fileutils/src/main/resources/META-INF/gshell/components.xml (original)
+++ geronimo/gshell/trunk/gshell-commands/gshell-fileutils/src/main/resources/META-INF/gshell/components.xml Fri Nov 28 01:28:57 2008
@@ -35,10 +35,10 @@
<property name="fileSystemAccess" ref="fileSystemAccess"/>
</bean>
- <gshell:plugin name="gshell-vfs">
+ <gshell:plugin name="gshell-fileutils">
<gshell:command-bundle name="default">
<gshell:command name="cd">
- <gshell:action class="org.apache.geronimo.gshell.commands.vfs.ChangeDirectoryAction" parent="vfsCommandActionTemplate"/>
+ <gshell:action class="org.apache.geronimo.gshell.commands.fileutils.ChangeDirectoryAction" parent="vfsCommandActionTemplate"/>
<gshell:completers>
<ref bean="fileObjectNameCompleter"/>
<null/>
@@ -46,11 +46,11 @@
</gshell:command>
<gshell:command name="pwd" type="stateless">
- <gshell:action class="org.apache.geronimo.gshell.commands.vfs.CurrentDirectoryAction" parent="vfsCommandActionTemplate"/>
+ <gshell:action class="org.apache.geronimo.gshell.commands.fileutils.CurrentDirectoryAction" parent="vfsCommandActionTemplate"/>
</gshell:command>
<gshell:command name="ls">
- <gshell:action class="org.apache.geronimo.gshell.commands.vfs.ListDirectoryAction" parent="vfsCommandActionTemplate"/>
+ <gshell:action class="org.apache.geronimo.gshell.commands.fileutils.ListDirectoryAction" parent="vfsCommandActionTemplate"/>
<gshell:completers>
<ref bean="fileObjectNameCompleter"/>
<null/>
@@ -60,7 +60,7 @@
<gshell:link name="dir" target="ls"/>
<gshell:command name="cp">
- <gshell:action class="org.apache.geronimo.gshell.commands.vfs.CopyAction" parent="vfsCommandActionTemplate"/>
+ <gshell:action class="org.apache.geronimo.gshell.commands.fileutils.CopyAction" parent="vfsCommandActionTemplate"/>
<gshell:completers>
<ref bean="fileObjectNameCompleter"/>
<ref bean="fileObjectNameCompleter"/>
@@ -71,7 +71,7 @@
<gshell:link name="copy" target="cp"/>
<gshell:command name="rm">
- <gshell:action class="org.apache.geronimo.gshell.commands.vfs.RemoveAction" parent="vfsCommandActionTemplate"/>
+ <gshell:action class="org.apache.geronimo.gshell.commands.fileutils.RemoveAction" parent="vfsCommandActionTemplate"/>
<gshell:completers>
<ref bean="fileObjectNameCompleter"/>
<null/>
@@ -81,7 +81,7 @@
<gshell:link name="del" target="rm"/>
<gshell:command name="fileinfo">
- <gshell:action class="org.apache.geronimo.gshell.commands.vfs.FileInfoAction" parent="vfsCommandActionTemplate"/>
+ <gshell:action class="org.apache.geronimo.gshell.commands.fileutils.FileInfoAction" parent="vfsCommandActionTemplate"/>
<gshell:completers>
<ref bean="fileObjectNameCompleter"/>
<null/>
@@ -89,7 +89,7 @@
</gshell:command>
<gshell:command name="touch">
- <gshell:action class="org.apache.geronimo.gshell.commands.vfs.TouchAction" parent="vfsCommandActionTemplate"/>
+ <gshell:action class="org.apache.geronimo.gshell.commands.fileutils.TouchAction" parent="vfsCommandActionTemplate"/>
<gshell:completers>
<ref bean="fileObjectNameCompleter"/>
<null/>
Added: geronimo/gshell/trunk/gshell-commands/gshell-fileutils/src/main/resources/org/apache/geronimo/gshell/commands/fileutils/ChangeDirectoryAction.properties
URL: http://svn.apache.org/viewvc/geronimo/gshell/trunk/gshell-commands/gshell-fileutils/src/main/resources/org/apache/geronimo/gshell/commands/fileutils/ChangeDirectoryAction.properties?rev=721400&view=auto
==============================================================================
--- geronimo/gshell/trunk/gshell-commands/gshell-fileutils/src/main/resources/org/apache/geronimo/gshell/commands/fileutils/ChangeDirectoryAction.properties (added)
+++ geronimo/gshell/trunk/gshell-commands/gshell-fileutils/src/main/resources/org/apache/geronimo/gshell/commands/fileutils/ChangeDirectoryAction.properties Fri Nov 28 01:28:57 2008
@@ -0,0 +1,30 @@
+##
+## Licensed to the Apache Software Foundation (ASF) under one
+## or more contributor license agreements. See the NOTICE file
+## distributed with this work for additional information
+## regarding copyright ownership. The ASF licenses this file
+## to you under the Apache License, Version 2.0 (the
+## "License"); you may not use this file except in compliance
+## with the License. You may obtain a copy of the License at
+##
+## http://www.apache.org/licenses/LICENSE-2.0
+##
+## Unless required by applicable law or agreed to in writing,
+## software distributed under the License is distributed on an
+## "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+## KIND, either express or implied. See the License for the
+## specific language governing permissions and limitations
+## under the License.
+##
+
+##
+## $Rev$ $Date$
+##
+
+command.description=Changes the current directory.
+
+command.argument.path=The path of the directory to change to
+command.argument.path.token=PATH
+
+command.manual=\
+ TODO: cd manual
\ No newline at end of file
Propchange: geronimo/gshell/trunk/gshell-commands/gshell-fileutils/src/main/resources/org/apache/geronimo/gshell/commands/fileutils/ChangeDirectoryAction.properties
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: geronimo/gshell/trunk/gshell-commands/gshell-fileutils/src/main/resources/org/apache/geronimo/gshell/commands/fileutils/ChangeDirectoryAction.properties
------------------------------------------------------------------------------
svn:keywords = Date Author Id Revision HeadURL
Propchange: geronimo/gshell/trunk/gshell-commands/gshell-fileutils/src/main/resources/org/apache/geronimo/gshell/commands/fileutils/ChangeDirectoryAction.properties
------------------------------------------------------------------------------
svn:mime-type = text/plain
Added: geronimo/gshell/trunk/gshell-commands/gshell-fileutils/src/main/resources/org/apache/geronimo/gshell/commands/fileutils/CopyAction.properties
URL: http://svn.apache.org/viewvc/geronimo/gshell/trunk/gshell-commands/gshell-fileutils/src/main/resources/org/apache/geronimo/gshell/commands/fileutils/CopyAction.properties?rev=721400&view=auto
==============================================================================
--- geronimo/gshell/trunk/gshell-commands/gshell-fileutils/src/main/resources/org/apache/geronimo/gshell/commands/fileutils/CopyAction.properties (added)
+++ geronimo/gshell/trunk/gshell-commands/gshell-fileutils/src/main/resources/org/apache/geronimo/gshell/commands/fileutils/CopyAction.properties Fri Nov 28 01:28:57 2008
@@ -0,0 +1,33 @@
+##
+## Licensed to the Apache Software Foundation (ASF) under one
+## or more contributor license agreements. See the NOTICE file
+## distributed with this work for additional information
+## regarding copyright ownership. The ASF licenses this file
+## to you under the Apache License, Version 2.0 (the
+## "License"); you may not use this file except in compliance
+## with the License. You may obtain a copy of the License at
+##
+## http://www.apache.org/licenses/LICENSE-2.0
+##
+## Unless required by applicable law or agreed to in writing,
+## software distributed under the License is distributed on an
+## "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+## KIND, either express or implied. See the License for the
+## specific language governing permissions and limitations
+## under the License.
+##
+
+##
+## $Rev$ $Date$
+##
+
+command.description=Copies a file or directory.
+
+command.argument.sourcePath=Source file or directory path
+command.argument.sourcePath.token=SOURCE
+
+command.argument.targetPath=Target file or directory path
+command.argument.targetPath.token=TARGET
+
+command.manual=\
+ TODO: copy manual
\ No newline at end of file
Propchange: geronimo/gshell/trunk/gshell-commands/gshell-fileutils/src/main/resources/org/apache/geronimo/gshell/commands/fileutils/CopyAction.properties
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: geronimo/gshell/trunk/gshell-commands/gshell-fileutils/src/main/resources/org/apache/geronimo/gshell/commands/fileutils/CopyAction.properties
------------------------------------------------------------------------------
svn:keywords = Date Author Id Revision HeadURL
Propchange: geronimo/gshell/trunk/gshell-commands/gshell-fileutils/src/main/resources/org/apache/geronimo/gshell/commands/fileutils/CopyAction.properties
------------------------------------------------------------------------------
svn:mime-type = text/plain
Added: geronimo/gshell/trunk/gshell-commands/gshell-fileutils/src/main/resources/org/apache/geronimo/gshell/commands/fileutils/CurrentDirectoryAction.properties
URL: http://svn.apache.org/viewvc/geronimo/gshell/trunk/gshell-commands/gshell-fileutils/src/main/resources/org/apache/geronimo/gshell/commands/fileutils/CurrentDirectoryAction.properties?rev=721400&view=auto
==============================================================================
--- geronimo/gshell/trunk/gshell-commands/gshell-fileutils/src/main/resources/org/apache/geronimo/gshell/commands/fileutils/CurrentDirectoryAction.properties (added)
+++ geronimo/gshell/trunk/gshell-commands/gshell-fileutils/src/main/resources/org/apache/geronimo/gshell/commands/fileutils/CurrentDirectoryAction.properties Fri Nov 28 01:28:57 2008
@@ -0,0 +1,27 @@
+##
+## Licensed to the Apache Software Foundation (ASF) under one
+## or more contributor license agreements. See the NOTICE file
+## distributed with this work for additional information
+## regarding copyright ownership. The ASF licenses this file
+## to you under the Apache License, Version 2.0 (the
+## "License"); you may not use this file except in compliance
+## with the License. You may obtain a copy of the License at
+##
+## http://www.apache.org/licenses/LICENSE-2.0
+##
+## Unless required by applicable law or agreed to in writing,
+## software distributed under the License is distributed on an
+## "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+## KIND, either express or implied. See the License for the
+## specific language governing permissions and limitations
+## under the License.
+##
+
+##
+## $Rev$ $Date$
+##
+
+command.description=Displays the current directory.
+
+command.manual=\
+ TODO: pwd manual
\ No newline at end of file
Propchange: geronimo/gshell/trunk/gshell-commands/gshell-fileutils/src/main/resources/org/apache/geronimo/gshell/commands/fileutils/CurrentDirectoryAction.properties
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: geronimo/gshell/trunk/gshell-commands/gshell-fileutils/src/main/resources/org/apache/geronimo/gshell/commands/fileutils/CurrentDirectoryAction.properties
------------------------------------------------------------------------------
svn:keywords = Date Author Id Revision HeadURL
Propchange: geronimo/gshell/trunk/gshell-commands/gshell-fileutils/src/main/resources/org/apache/geronimo/gshell/commands/fileutils/CurrentDirectoryAction.properties
------------------------------------------------------------------------------
svn:mime-type = text/plain
Added: geronimo/gshell/trunk/gshell-commands/gshell-fileutils/src/main/resources/org/apache/geronimo/gshell/commands/fileutils/FileInfoAction.properties
URL: http://svn.apache.org/viewvc/geronimo/gshell/trunk/gshell-commands/gshell-fileutils/src/main/resources/org/apache/geronimo/gshell/commands/fileutils/FileInfoAction.properties?rev=721400&view=auto
==============================================================================
--- geronimo/gshell/trunk/gshell-commands/gshell-fileutils/src/main/resources/org/apache/geronimo/gshell/commands/fileutils/FileInfoAction.properties (added)
+++ geronimo/gshell/trunk/gshell-commands/gshell-fileutils/src/main/resources/org/apache/geronimo/gshell/commands/fileutils/FileInfoAction.properties Fri Nov 28 01:28:57 2008
@@ -0,0 +1,30 @@
+##
+## Licensed to the Apache Software Foundation (ASF) under one
+## or more contributor license agreements. See the NOTICE file
+## distributed with this work for additional information
+## regarding copyright ownership. The ASF licenses this file
+## to you under the Apache License, Version 2.0 (the
+## "License"); you may not use this file except in compliance
+## with the License. You may obtain a copy of the License at
+##
+## http://www.apache.org/licenses/LICENSE-2.0
+##
+## Unless required by applicable law or agreed to in writing,
+## software distributed under the License is distributed on an
+## "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+## KIND, either express or implied. See the License for the
+## specific language governing permissions and limitations
+## under the License.
+##
+
+##
+## $Rev$ $Date$
+##
+
+command.description=Displays information about a file.
+
+command.argument.path=Path of file to display
+command.argument.path.token=PATH
+
+command.manual=\
+ TODO: fileinfo manual
\ No newline at end of file
Propchange: geronimo/gshell/trunk/gshell-commands/gshell-fileutils/src/main/resources/org/apache/geronimo/gshell/commands/fileutils/FileInfoAction.properties
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: geronimo/gshell/trunk/gshell-commands/gshell-fileutils/src/main/resources/org/apache/geronimo/gshell/commands/fileutils/FileInfoAction.properties
------------------------------------------------------------------------------
svn:keywords = Date Author Id Revision HeadURL
Propchange: geronimo/gshell/trunk/gshell-commands/gshell-fileutils/src/main/resources/org/apache/geronimo/gshell/commands/fileutils/FileInfoAction.properties
------------------------------------------------------------------------------
svn:mime-type = text/plain
Added: geronimo/gshell/trunk/gshell-commands/gshell-fileutils/src/main/resources/org/apache/geronimo/gshell/commands/fileutils/ListDirectoryAction.properties
URL: http://svn.apache.org/viewvc/geronimo/gshell/trunk/gshell-commands/gshell-fileutils/src/main/resources/org/apache/geronimo/gshell/commands/fileutils/ListDirectoryAction.properties?rev=721400&view=auto
==============================================================================
--- geronimo/gshell/trunk/gshell-commands/gshell-fileutils/src/main/resources/org/apache/geronimo/gshell/commands/fileutils/ListDirectoryAction.properties (added)
+++ geronimo/gshell/trunk/gshell-commands/gshell-fileutils/src/main/resources/org/apache/geronimo/gshell/commands/fileutils/ListDirectoryAction.properties Fri Nov 28 01:28:57 2008
@@ -0,0 +1,36 @@
+##
+## Licensed to the Apache Software Foundation (ASF) under one
+## or more contributor license agreements. See the NOTICE file
+## distributed with this work for additional information
+## regarding copyright ownership. The ASF licenses this file
+## to you under the Apache License, Version 2.0 (the
+## "License"); you may not use this file except in compliance
+## with the License. You may obtain a copy of the License at
+##
+## http://www.apache.org/licenses/LICENSE-2.0
+##
+## Unless required by applicable law or agreed to in writing,
+## software distributed under the License is distributed on an
+## "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+## KIND, either express or implied. See the License for the
+## specific language governing permissions and limitations
+## under the License.
+##
+
+##
+## $Rev$ $Date$
+##
+
+command.description=List the contents of a file or directory.
+
+command.argument.path=The file or directory path to list.
+command.argument.path.token=PATH
+
+command.option.longList=List in long format
+
+command.option.includeHidden=Include hidden files
+
+command.option.recursive=List the contents of directories recursivly
+
+command.manual=\
+ TODO: ls manual
\ No newline at end of file
Propchange: geronimo/gshell/trunk/gshell-commands/gshell-fileutils/src/main/resources/org/apache/geronimo/gshell/commands/fileutils/ListDirectoryAction.properties
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: geronimo/gshell/trunk/gshell-commands/gshell-fileutils/src/main/resources/org/apache/geronimo/gshell/commands/fileutils/ListDirectoryAction.properties
------------------------------------------------------------------------------
svn:keywords = Date Author Id Revision HeadURL
Propchange: geronimo/gshell/trunk/gshell-commands/gshell-fileutils/src/main/resources/org/apache/geronimo/gshell/commands/fileutils/ListDirectoryAction.properties
------------------------------------------------------------------------------
svn:mime-type = text/plain
Added: geronimo/gshell/trunk/gshell-commands/gshell-fileutils/src/main/resources/org/apache/geronimo/gshell/commands/fileutils/RemoveAction.properties
URL: http://svn.apache.org/viewvc/geronimo/gshell/trunk/gshell-commands/gshell-fileutils/src/main/resources/org/apache/geronimo/gshell/commands/fileutils/RemoveAction.properties?rev=721400&view=auto
==============================================================================
--- geronimo/gshell/trunk/gshell-commands/gshell-fileutils/src/main/resources/org/apache/geronimo/gshell/commands/fileutils/RemoveAction.properties (added)
+++ geronimo/gshell/trunk/gshell-commands/gshell-fileutils/src/main/resources/org/apache/geronimo/gshell/commands/fileutils/RemoveAction.properties Fri Nov 28 01:28:57 2008
@@ -0,0 +1,30 @@
+##
+## Licensed to the Apache Software Foundation (ASF) under one
+## or more contributor license agreements. See the NOTICE file
+## distributed with this work for additional information
+## regarding copyright ownership. The ASF licenses this file
+## to you under the Apache License, Version 2.0 (the
+## "License"); you may not use this file except in compliance
+## with the License. You may obtain a copy of the License at
+##
+## http://www.apache.org/licenses/LICENSE-2.0
+##
+## Unless required by applicable law or agreed to in writing,
+## software distributed under the License is distributed on an
+## "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+## KIND, either express or implied. See the License for the
+## specific language governing permissions and limitations
+## under the License.
+##
+
+##
+## $Rev$ $Date$
+##
+
+command.description=Remove a file or directory.
+
+command.argument.path=File or directory PATH to be removed.
+command.argumetn.path.token=PATH
+
+command.manual=\
+ TODO: rm manual
\ No newline at end of file
Propchange: geronimo/gshell/trunk/gshell-commands/gshell-fileutils/src/main/resources/org/apache/geronimo/gshell/commands/fileutils/RemoveAction.properties
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: geronimo/gshell/trunk/gshell-commands/gshell-fileutils/src/main/resources/org/apache/geronimo/gshell/commands/fileutils/RemoveAction.properties
------------------------------------------------------------------------------
svn:keywords = Date Author Id Revision HeadURL
Propchange: geronimo/gshell/trunk/gshell-commands/gshell-fileutils/src/main/resources/org/apache/geronimo/gshell/commands/fileutils/RemoveAction.properties
------------------------------------------------------------------------------
svn:mime-type = text/plain
Added: geronimo/gshell/trunk/gshell-commands/gshell-fileutils/src/main/resources/org/apache/geronimo/gshell/commands/fileutils/TouchAction.properties
URL: http://svn.apache.org/viewvc/geronimo/gshell/trunk/gshell-commands/gshell-fileutils/src/main/resources/org/apache/geronimo/gshell/commands/fileutils/TouchAction.properties?rev=721400&view=auto
==============================================================================
--- geronimo/gshell/trunk/gshell-commands/gshell-fileutils/src/main/resources/org/apache/geronimo/gshell/commands/fileutils/TouchAction.properties (added)
+++ geronimo/gshell/trunk/gshell-commands/gshell-fileutils/src/main/resources/org/apache/geronimo/gshell/commands/fileutils/TouchAction.properties Fri Nov 28 01:28:57 2008
@@ -0,0 +1,30 @@
+##
+## Licensed to the Apache Software Foundation (ASF) under one
+## or more contributor license agreements. See the NOTICE file
+## distributed with this work for additional information
+## regarding copyright ownership. The ASF licenses this file
+## to you under the Apache License, Version 2.0 (the
+## "License"); you may not use this file except in compliance
+## with the License. You may obtain a copy of the License at
+##
+## http://www.apache.org/licenses/LICENSE-2.0
+##
+## Unless required by applicable law or agreed to in writing,
+## software distributed under the License is distributed on an
+## "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+## KIND, either express or implied. See the License for the
+## specific language governing permissions and limitations
+## under the License.
+##
+
+##
+## $Rev$ $Date$
+##
+
+command.description=Sets the last-modified time of a file.
+
+command.argument.path=The path of the file to modify.
+command.argument.path.token=PATH
+
+command.manual=\
+ TODO: touch manual
\ No newline at end of file
Propchange: geronimo/gshell/trunk/gshell-commands/gshell-fileutils/src/main/resources/org/apache/geronimo/gshell/commands/fileutils/TouchAction.properties
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: geronimo/gshell/trunk/gshell-commands/gshell-fileutils/src/main/resources/org/apache/geronimo/gshell/commands/fileutils/TouchAction.properties
------------------------------------------------------------------------------
svn:keywords = Date Author Id Revision HeadURL
Propchange: geronimo/gshell/trunk/gshell-commands/gshell-fileutils/src/main/resources/org/apache/geronimo/gshell/commands/fileutils/TouchAction.properties
------------------------------------------------------------------------------
svn:mime-type = text/plain
Modified: geronimo/gshell/trunk/gshell-commands/pom.xml
URL: http://svn.apache.org/viewvc/geronimo/gshell/trunk/gshell-commands/pom.xml?rev=721400&r1=721399&r2=721400&view=diff
==============================================================================
--- geronimo/gshell/trunk/gshell-commands/pom.xml (original)
+++ geronimo/gshell/trunk/gshell-commands/pom.xml Fri Nov 28 01:28:57 2008
@@ -62,7 +62,7 @@
<module>gshell-optional</module>
<module>gshell-repository</module>
<module>gshell-bsf</module>
- <module>gshell-vfs</module>
+ <module>gshell-fileutils</module>
<module>gshell-log4j</module>
<module>gshell-ssh</module>
</modules>
Modified: geronimo/gshell/trunk/pom.xml
URL: http://svn.apache.org/viewvc/geronimo/gshell/trunk/pom.xml?rev=721400&r1=721399&r2=721400&view=diff
==============================================================================
--- geronimo/gshell/trunk/pom.xml (original)
+++ geronimo/gshell/trunk/pom.xml Fri Nov 28 01:28:57 2008
@@ -358,7 +358,7 @@
<dependency>
<groupId>org.apache.geronimo.gshell.commands</groupId>
- <artifactId>gshell-vfs</artifactId>
+ <artifactId>gshell-fileutils</artifactId>
<version>1.0-alpha-2-SNAPSHOT</version>
</dependency>