org.crsh.cmdline.completers
Class FileCompleter
java.lang.Object
org.crsh.cmdline.completers.AbstractPathCompleter<File>
org.crsh.cmdline.completers.FileCompleter
- All Implemented Interfaces:
- Completer
public class FileCompleter
- extends AbstractPathCompleter<File>
A completer for the current file system.
- When the prefix is absolute (it starts with
/
char) completion will be done from the prefix
- When the prefix is relative (it does not start with a
/
char, the completion is done from the
directory evaluated with the expression new java.io.File(".").getCanonicalPath()
- Author:
- Julien Viet
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
FileCompleter
public FileCompleter()
getCurrentPath
protected String getCurrentPath()
throws Exception
- Specified by:
getCurrentPath
in class AbstractPathCompleter<File>
- Throws:
Exception
getPath
protected File getPath(String path)
- Specified by:
getPath
in class AbstractPathCompleter<File>
exists
protected boolean exists(File path)
- Specified by:
exists
in class AbstractPathCompleter<File>
isDirectory
protected boolean isDirectory(File path)
- Specified by:
isDirectory
in class AbstractPathCompleter<File>
isFile
protected boolean isFile(File path)
- Specified by:
isFile
in class AbstractPathCompleter<File>
getChilren
protected Collection<File> getChilren(File path)
- Specified by:
getChilren
in class AbstractPathCompleter<File>
getName
protected String getName(File path)
- Specified by:
getName
in class AbstractPathCompleter<File>
Copyright © 2012 eXo Platform SAS. All Rights Reserved.