Class LSParser


  • public class LSParser
    extends java.lang.Object
    Parser for the output of ls command from any ssh server on any OS.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private static java.util.regex.Pattern PATTERN
      output samples see LSParserTest: osx "-rw-r--r-- 1 joakim joakim 1194 Dec 11 09:25 pom.xml" osx fr : "-rw-r--r-- 1 olamy staff 19 21 sep 00:34 more-resources.dat" cygwin : "drwxr-xr-x+ 5 joakim None 0 Dec 11 10:30 pom.xml" linux : "-rw-r--r-- 1 joakim joakim 1194 2006-12-11 09:25 pom.xml"
    • Constructor Summary

      Constructors 
      Constructor Description
      LSParser()  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.util.List<java.lang.String> parseFiles​(java.lang.String rawLS)
      Parse a raw "ls -FlA", and obtain the list of files.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • PATTERN

        private static final java.util.regex.Pattern PATTERN
        output samples see LSParserTest:
        • osx "-rw-r--r-- 1 joakim joakim 1194 Dec 11 09:25 pom.xml"
        • osx fr : "-rw-r--r-- 1 olamy staff 19 21 sep 00:34 more-resources.dat"
        • cygwin : "drwxr-xr-x+ 5 joakim None 0 Dec 11 10:30 pom.xml"
        • linux : "-rw-r--r-- 1 joakim joakim 1194 2006-12-11 09:25 pom.xml"
    • Constructor Detail

      • LSParser

        public LSParser()
    • Method Detail

      • parseFiles

        public java.util.List<java.lang.String> parseFiles​(java.lang.String rawLS)
                                                    throws TransferFailedException
        Parse a raw "ls -FlA", and obtain the list of files.
        Parameters:
        rawLS - the raw LS to parse.
        Returns:
        the list of files found.
        Throws:
        TransferFailedException