Follow Techotopia on Twitter

On-line Guides
All Guides
eBook Store
iOS / Android
Linux for Beginners
Office Productivity
Linux Installation
Linux Security
Linux Utilities
Linux Virtualization
Linux Kernel
System/Network Admin
Scripting Languages
Development Tools
Web Development
GUI Toolkits/Desktop
Mail Systems
Eclipse Documentation

How To Guides
General System Admin
Linux Security
Linux Filesystems
Web Servers
Graphics & Desktop
PC Hardware
Problem Solutions
Privacy Policy




Eclipse RSE Development Guide
Previous Page Home Next Page

FTP Directory Listing Parsers


RSE 2.0

Extension point that allows providing extra parsers for the FTP LIST command output. Apache commons net provides some APIs and factories to costumize the parser and this extension provides an easy way to setup a custom parser and integrate it into RSE. The provided extension points will be available as a list in the property "FTP Settings", allowing the user to select them overriding the default parser. The string attributes defaultDateFormatStr recentDateFormatStr serverLanguageCode serverTimeZoneId shortMonthNames have to follow the format described by Each parser can also specify one or more FTP commands to be sent after establishing the connection in the initCommands attribute.

Configuration Markup:

<!ELEMENT extension ( parser)+>

<!ATTLIST extension





<!ELEMENT parser ( initCommand)*>

<!ATTLIST parser

id                   CDATA #REQUIRED

label                CDATA #REQUIRED

class                CDATA #REQUIRED

defaultDateFormatStr CDATA #IMPLIED

recentDateFormatStr  CDATA #IMPLIED

serverLanguageCode   CDATA #IMPLIED

shortMonthNames      CDATA #IMPLIED

serverTimeZoneId     CDATA #IMPLIED

systemTypeRegex      CDATA #IMPLIED

priority             CDATA #IMPLIED

listCommandModifiers CDATA #IMPLIED


  • id -
  • label - Name that will be displayed in the FTP Settings dialog
  • class - Extension of, implementing the parser for the specific server
  • defaultDateFormatStr - This property specifies the main date format that will be used by a parser configured by this configuration to parse file timestamps. If this is not specified, such a parser will use as a default value, the most commonly used format which will be in as used in en_US locales. This should be in the format described for java.text.SimpleDateFormat. property.
  • recentDateFormatStr - This property specifies a secondary date format that will be used by a parser configured by this configuration to parse file timestamps, typically those less than a year old. If this is not specified, such a parser will not attempt to parse using an alternate format. This is used primarily in unix-based systems. This should be in the format described for java.text.SimpleDateFormat.
  • serverLanguageCode - This property allows user to specify a two-letter ISO-639 language code that will be used to configure the set of month names used by the file timestamp parser. If neither this nor the shortMonthNames is specified, parsing will assume English month names, which may or may not be significant, depending on whether the date format(s) specified via defaultDateFormatStr and/or recentDateFormatStr are using numeric or alphabetic month names. If the code supplied is not supported here, en_US month names will be used. We are supporting here those language codes which, when a java.util.Locale is constucted using it, and a java.text.SimpleDateFormat is constructed using that Locale, the array returned by the SimpleDateFormat's getShortMonths() method consists solely of three 8-bit ASCII character strings. Additionally, languages which do not meet this requirement are included if a common alternative set of short month names is known to be used. This means that users who can tell us of additional such encodings may get them added to the list of supported languages by contacting the Apache Commons Net team. Please note that this attribute will NOT be used to determine a locale-based date format for the language. Experience has shown that many if not most FTP servers outside the United States employ the standard en_US date format orderings of MMM d yyyy and MMM d HH:mm and attempting to deduce this automatically here would cause more problems than it would solve. The date format must be changed via the defaultDateFormatStr and/or recentDateFormatStr parameters.
  • shortMonthNames - This property allows the user to specify a set of month names used by the server that is different from those that may be specified using the setServerLanguageCode property. This should be a string containing twelve strings each composed of three characters, delimited by pipe (|) characters. Currently, only 8-bit ASCII characters are known to be supported. For example, a set of month names used by a hypothetical Icelandic FTP server might conceivably be specified as "jan|feb|mar|apr|maí|jún|júl|ágú|sep|okt|nóv|des".
  • serverTimeZoneId - This property allows a time zone to be specified corresponding to that known to be used by an FTP server in file listings. This might be particularly useful to clients such as Ant that try to use these timestamps for dependency checking. This should be one of the identifiers used by java.util.TimeZone to refer to time zones, for example, America/Chicago or Asia/Rangoon.
  • systemTypeRegex - Regular expression used to match with the string returned by the FTP SYST command to autodetect the parser if not specified by the user
  • priority - Priority used if more than one extension matches the regular expression given by the ftpSystemTypes attribute. Integer values are allowed. In case of more than one parser with a matching regular expression, the parser with lower priority number will be used. If no priority is specified, the default value will be Integer.MAX_VALUE.
  • listCommandModifiers - Modifiers of the FTP "LIST" command. As an example if the LIST command has to be "LIST -l", the contents of this optional field has to be "-l"

<!ELEMENT initCommand EMPTY>

<!ATTLIST initCommand



FTP initialization command to perform after connecting to the remote server, when the server's system type is detected to match the current listing parser.

  • cmd - Command string to execute


Supplied Implementation:
Customized VMS and WinNT implementations are supplied in the org.eclipse.rse.subsystems.files.ftp plug-in.

Copyright (c) 2007, 2008 Symbian Software Ltd. and others. All rights reserved. This program and the accompanying materials are made available under the terms of the Eclipse Public License v1.0 which accompanies this distribution, and is available at Contributors: Javier Montalvo Orus (Symbian) - initial API and implementation Javier Montalvo Orus (Symbian) - added ftpSystemTypes and priority Javier Montalvo Orus (Symbian) - [212382] additional "initCommands" slot for ftpListingParsers extension point

  Published under the terms of the Eclipse Public License Version 1.0 ("EPL") Design by Interspire